home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Graphismes / 3D / POV-Ray 3.0B5a PPC / POV-Ray 3.0B5a / POVDOC.Documentation / POVRAY.DOC < prev   
Text File  |  1996-02-19  |  507KB  |  11,922 lines

  1.  
  2.                     Persistence of Vision(tm) Ray Tracer
  3.                                (POV-Ray(tm))
  4.  
  5.                        Reference Guide Version 3.0.6b
  6.  
  7.                         Copyright 1996 POV-Team(tm)
  8.  
  9.  
  10.  
  11. 1                Introduction
  12. 2                POV-Ray Options
  13.    2.1              Setting POV-Ray Options
  14.       2.1.1            Command Line Switches
  15.       2.1.2            Using INI Files
  16.       2.1.3            Using the POVINI Environment Variable
  17.    2.2              Options Reference
  18.       2.2.1            Animation Options
  19.          2.2.1.1          External Animation Loop
  20.          2.2.1.2          Internal Animation Loop
  21.          2.2.1.3          Subsets of Animation Frames
  22.          2.2.1.4          Cyclic Animation
  23.          2.2.1.5          Field Rendering
  24.       2.2.2            Output Options
  25.          2.2.2.1          General Output Options
  26.             2.2.2.1.1        Height and Width of Output
  27.             2.2.2.1.2        Partial Output Options
  28.             2.2.2.1.3        Interrupting Options
  29.             2.2.2.1.4        Resuming Options
  30.          2.2.2.2          Display Output Options
  31.             2.2.2.2.1        Display Hardware Settings
  32.             2.2.2.2.2        Display Related Settings
  33.             2.2.2.2.3        Mosaic Preview
  34.          2.2.2.3          File Output Options
  35.             2.2.2.3.1        Output File Type
  36.             2.2.2.3.2        Output File Name
  37.             2.2.2.3.3        Output File Buffer
  38.          2.2.2.4          CPU Utilization Histogram
  39.             2.2.2.4.1        File Type
  40.             2.2.2.4.2        File Name
  41.             2.2.2.4.3        Grid Size
  42.       2.2.3            Scene Parsing Options
  43.          2.2.3.1          Input File Name
  44.          2.2.3.2          Library Paths
  45.          2.2.3.3          Language Version
  46.          2.2.3.4          Removing User Bounding
  47.       2.2.4            Shell-out to Operating System
  48.          2.2.4.1          String Substitution in Shell Commands
  49.          2.2.4.2          Shell Command Sequencing
  50.          2.2.4.3          Shell Command Return Actions
  51.       2.2.5            Text Output
  52.          2.2.5.1          Text Streams
  53.          2.2.5.2          Console Text Output
  54.          2.2.5.3          Directing Text Streams to Files
  55.          2.2.5.4          Help Screen Switches
  56.       2.2.6            Tracing Options
  57.          2.2.6.1          Quality Settings
  58.          2.2.6.2          Automatic Bounding Control
  59.          2.2.6.3          Anti-Aliasing Options
  60. 3                Scene Description Language
  61.    3.1              Language Basics
  62.       3.1.1            Identifiers and Keywords
  63.       3.1.2            Comments
  64.       3.1.3            Float Expressions
  65.          3.1.3.1          Float Literals
  66.          3.1.3.2          Float Identifiers
  67.          3.1.3.3          Float Operators
  68.       3.1.4            Vector Expressions
  69.          3.1.4.1          Vector Literals
  70.          3.1.4.2          Vector Identifiers
  71.          3.1.4.3          Vector Operators
  72.          3.1.4.4          Operator Promotion
  73.       3.1.5            Specifying Colors
  74.          3.1.5.1          Color Vectors
  75.          3.1.5.2          Color Keywords
  76.          3.1.5.3          Color Identifiers
  77.          3.1.5.4          Color Operators
  78.          3.1.5.5          Common Color Pitfalls
  79.       3.1.6            Strings
  80.          3.1.6.1          String Literals
  81.          3.1.6.2          String Identifiers
  82.       3.1.7            Built-in Identifiers
  83.          3.1.7.1          Constant Built-in Identifiers
  84.          3.1.7.2          Built-in Identifier 'clock'
  85.          3.1.7.3          Built-in Identifier 'version'
  86.       3.1.8            Functions
  87.          3.1.8.1          Float Functions
  88.          3.1.8.2          Vector Functions
  89.          3.1.8.3          String Functions
  90.    3.2              Language Directives
  91.       3.2.1            Include Files
  92.       3.2.2            Declare
  93.          3.2.2.1          Declaring identifiers
  94.       3.2.3            Default Directive
  95.       3.2.4            Version Directive
  96.       3.2.5            Conditional Directives
  97.          3.2.5.1          IF ELSE Directives
  98.          3.2.5.2          IFDEF Directives
  99.          3.2.5.3          SWITCH CASE & RANGE Directives
  100.          3.2.5.4          WHILE Directive
  101.       3.2.6            User Message Directives
  102.          3.2.6.1          Text Message Streams
  103.          3.2.6.2          Text Formatting
  104.    3.3              POV-Ray Coordinate System
  105.       3.3.1            Transformations
  106.          3.3.1.1          Translate
  107.          3.3.1.2          Scale
  108.          3.3.1.3          Rotate
  109.          3.3.1.4          Matrix Keyword
  110.       3.3.2            Transformation Order
  111.       3.3.3            Transform Identifiers
  112.       3.3.4            Transforming Textures and Objects
  113.    3.4              Camera
  114.       3.4.1            Type of Projection
  115.       3.4.2            Focal Blur
  116.       3.4.3            Camera Ray Perturbation
  117.       3.4.4            Placing the Camera
  118.          3.4.4.1          Location and Look_At
  119.          3.4.4.2          The Sky Vector
  120.          3.4.4.3          The Direction Vector
  121.          3.4.4.4          Up and Right Vectors
  122.             3.4.4.4.1        Aspect Ratio
  123.             3.4.4.4.2        Handedness
  124.          3.4.4.5          Transforming the Camera
  125.       3.4.5            Camera Identifiers
  126.    3.5              Objects
  127.       3.5.1            Finite Solid Primitives
  128.  
  129.          3.5.1.1          Blob
  130.          3.5.1.2          Box
  131.          3.5.1.3          Cone
  132.          3.5.1.4          Cylinder
  133.          3.5.1.5          Height Field
  134.          3.5.1.6          Julia Fractal
  135.          3.5.1.7          Lathe
  136.          3.5.1.8          Prism
  137.          3.5.1.9          Sphere
  138.          3.5.1.10         Superquadric Ellipsoid
  139.          3.5.1.11         Surface of Revolution
  140.          3.5.1.12         Text
  141.          3.5.1.13         Torus
  142.       3.5.2            Finite Patch Primitives
  143.          3.5.2.1          Bicubic patch
  144.          3.5.2.2          Disc
  145.          3.5.2.3          Mesh
  146.          3.5.2.4          Polygon
  147.          3.5.2.5          Triangle and smooth triangle
  148.       3.5.3            Infinite Solid Primitives
  149.          3.5.3.1          Plane
  150.          3.5.3.2          Poly, Cubic and Quartic
  151.          3.5.3.3          Quadric
  152.       3.5.4            Constructive Solid Geometry
  153.          3.5.4.1          About CSG
  154.          3.5.4.2          Inside and Outside
  155.          3.5.4.3          Union
  156.          3.5.4.4          Intersection
  157.          3.5.4.5          Difference
  158.          3.5.4.6          Merge
  159.       3.5.5            Light Sources
  160.          3.5.5.1          Point Lights
  161.          3.5.5.2          Spotlights
  162.          3.5.5.3          Cylindrical Lights
  163.          3.5.5.4          Area Lights
  164.          3.5.5.5          Shadowless
  165.          3.5.5.6          Looks_like
  166.          3.5.5.7          Light Fading
  167.          3.5.5.8          Atmospheric Attenuation
  168.       3.5.6            Object Modifiers
  169.          3.5.6.1          Clipped_By
  170.          3.5.6.2          Bounded_By
  171.          3.5.6.3          Hollow
  172.          3.5.6.4          No_Shadow
  173.    3.6              Textures
  174.       3.6.1            Pigment
  175.          3.6.1.1          Solid Color Pigments
  176.          3.6.1.2          Color List Pigments
  177.          3.6.1.3          Color Maps
  178.          3.6.1.4          Pigment Maps
  179.          3.6.1.5          Image Maps
  180.             3.6.1.5.1        Specifying an Image Map
  181.             3.6.1.5.2        The map_type Option
  182.             3.6.1.5.3        The Filter and Transmit Bitmap Modifiers
  183.             3.6.1.5.4        Using the Alpha Channel
  184.          3.6.1.6          Quick Color
  185.       3.6.2            Normal
  186.          3.6.2.1          Slope Maps
  187.          3.6.2.2          Normal Maps
  188.          3.6.2.3          Bump Maps
  189.             3.6.2.3.1        Specifying a Bump Map
  190.             3.6.2.3.2        Bump_Size
  191.             3.6.2.3.3        Use_Index and Use_Color
  192.       3.6.3            Finish
  193.          3.6.3.1          Ambient
  194.          3.6.3.2          Diffuse Reflection Items
  195.             3.6.3.2.1        Diffuse
  196.             3.6.3.2.2        Brilliance
  197.             3.6.3.2.3        Crand Graininess
  198.          3.6.3.3          Highlights
  199.             3.6.3.3.1        Phong Highlights
  200.             3.6.3.3.2        Specular Highlight
  201.             3.6.3.3.3        Metallic Highlight Modifier
  202.          3.6.3.4          Specular Reflection
  203.          3.6.3.5          Refraction
  204.             3.6.3.5.1        Light Attenuation
  205.             3.6.3.5.2        Faked Caustics
  206.          3.6.3.6          Iridescence
  207.       3.6.4            Halo
  208.          3.6.4.1          Halo Type
  209.             3.6.4.1.1        Attenuating
  210.             3.6.4.1.2        Dust
  211.             3.6.4.1.3        Emitting
  212.             3.6.4.1.4        Glowing
  213.          3.6.4.2          Density Mapping
  214.             3.6.4.2.1        Box Mapping
  215.             3.6.4.2.2        Cylindrical Mapping
  216.             3.6.4.2.3        Planar Mapping
  217.             3.6.4.2.4        Spherical Mapping
  218.          3.6.4.3          Density Function
  219.             3.6.4.3.1        Constant
  220.             3.6.4.3.2        Linear
  221.             3.6.4.3.3        Cubic
  222.             3.6.4.3.4        Poly
  223.          3.6.4.4          Halo Color Map
  224.          3.6.4.5          Halo Sampling
  225.             3.6.4.5.1        Number of Samples
  226.             3.6.4.5.2        Supersampling
  227.             3.6.4.5.3        Jitter
  228.          3.6.4.6          Halo Modifiers
  229.             3.6.4.6.1        Turbulence Modifier
  230.             3.6.4.6.2        Octaves Modifier
  231.             3.6.4.6.3        Omega Modifier
  232.             3.6.4.6.4        Lambda Modifier
  233.             3.6.4.6.5        Frequency Modifier
  234.             3.6.4.6.6        Phase Modifier
  235.             3.6.4.6.7        Transformation Modifiers
  236.       3.6.5            Special Textures
  237.          3.6.5.1          Tiles
  238.          3.6.5.2          Material Maps
  239.             3.6.5.2.1        Specifying a Material Map
  240.       3.6.6            Layered Textures
  241.       3.6.7            Patterns
  242.          3.6.7.1          Agate
  243.          3.6.7.2          Average
  244.          3.6.7.3          Bozo
  245.          3.6.7.4          Brick
  246.          3.6.7.5          Bumps
  247.          3.6.7.6          Checker
  248.          3.6.7.7          Crackle
  249.          3.6.7.8          Dents
  250.          3.6.7.9          Gradient
  251.          3.6.7.10         Granite
  252.          3.6.7.11         Hexagon
  253.          3.6.7.12         Leopard
  254.          3.6.7.13         Mandel
  255.          3.6.7.14         Marble
  256.  
  257.          3.6.7.15         Onion
  258.          3.6.7.16         Quilted
  259.          3.6.7.17         Radial
  260.          3.6.7.18         Ripples
  261.          3.6.7.19         Spiral1
  262.          3.6.7.20         Spiral2
  263.          3.6.7.21         Spotted
  264.          3.6.7.22         Waves
  265.          3.6.7.23         Wood
  266.          3.6.7.24         Wrinkles
  267.       3.6.8            Pattern Modifiers
  268.          3.6.8.1          Transforming Patterns
  269.          3.6.8.2          Frequency and Phase
  270.          3.6.8.3          Waveform
  271.          3.6.8.4          Turbulence
  272.          3.6.8.5          Octaves
  273.          3.6.8.6          Lambda
  274.          3.6.8.7          Omega
  275.          3.6.8.8          Warps
  276.             3.6.8.8.1        Black Hole Warp
  277.             3.6.8.8.2        Repeat Warp
  278.             3.6.8.8.3        Turbulence Warp
  279.          3.6.8.9          Bitmap modifiers
  280.             3.6.8.9.1        The once Option
  281.             3.6.8.9.2        The "map_type" Option
  282.             3.6.8.9.3        The interpolate Option
  283.    3.7              Atmospheric Effects
  284.       3.7.1            Atmosphere
  285.       3.7.2            Background
  286.       3.7.3            Fog
  287.       3.7.4            Sky Sphere
  288.       3.7.5            Rainbow
  289.    3.8              Miscellaneous Features
  290.       3.8.1            Ambient Light
  291.    3.9              Global Settings
  292.       3.9.1            ADC_Bailout
  293.       3.9.2            Ambient Light
  294.       3.9.3            Assumed_Gamma
  295.          3.9.3.1          Monitor Gamma
  296.          3.9.3.2          Image File Gamma
  297.          3.9.3.3          Scene File Gamma
  298.       3.9.4            HF_Gray_16
  299.       3.9.5            Irid_Wavelength
  300.       3.9.6            Max_Trace_Level
  301.       3.9.7            Max_Intersections
  302.       3.9.8            Number_Of_Waves
  303.       3.9.9            Radiosity
  304.          3.9.9.1          How Radiosity Works
  305.          3.9.9.2          Adjusting Radiosity
  306.             3.9.9.2.1        brightness
  307.             3.9.9.2.2        count
  308.             3.9.9.2.3        distance_maximum
  309.             3.9.9.2.4        error_bound
  310.             3.9.9.2.5        gray_threshold
  311.             3.9.9.2.6        low_error_factor
  312.             3.9.9.2.7        minimum_reuse
  313.             3.9.9.2.8        nearest_count
  314.             3.9.9.2.9        radiosity_quality
  315.             3.9.9.2.10       recursion_limit
  316.          3.9.9.3          Tips on Radiosity
  317.  
  318.                              *** APPENDICES ***
  319.  
  320. A                POV-Ray Output Messages
  321.    A.1              Options in Use
  322.    A.2              Warning Messages
  323.       A.2.1            Warnings during the Parsing Stage
  324.       A.2.2            Other Warnings
  325.    A.3              Error Messages
  326.       A.3.1            Scene File Errors
  327.       A.3.2            Other Errors
  328.    A.4              Statistics
  329. B                Help on Help
  330. C                Frequently Asked Questions
  331. D                Where to Get More POV-Ray Stuff
  332. E                Copyright
  333. F                Authors
  334.  
  335.  
  336. 1                Introduction
  337.  
  338. This reference  guide  describes  all  command  line  options  and  INI  file
  339. switches, the scene description language and all other features that are part
  340. of POV-Ray. It is supposed to be used as a reference for looking  things  up.
  341. It does not contain detailed explanations on how scenes are  written  or  how
  342. POV-Ray is used. It just explains all features, their  syntax,  applications,
  343. limits, drawbacks, etc.
  344.  
  345. A seperate User Guide will describe how POV-Ray is installed and started.  It
  346. will also have a tutorial section that will explain how to create own scenes,
  347. how to use most of the special features, etc. At this time the User Guide may
  348. not be available because we just weren't able to finish.
  349.  
  350. 2                POV-Ray Options
  351.  
  352. POV-Ray was originally  created  as  a  command-line  program  for  operating
  353. systems without graphical interfaces, dialog boxes and pull-down menus.  Most
  354. versions of POV-Ray still use command-line switches to tell it  what  to  do.
  355. This documentation assumes you are using the command-line version. If you are
  356. using Macintosh, MS-Windows or other GUI versions, there will be dialog boxes
  357. or menus which do the same thing. There is system-specific documentation  for
  358. each system describing the specific commands.
  359.  
  360. 2.1              Setting POV-Ray Options
  361.  
  362. There are two distinct ways of setting POV-Ray options: command line switches
  363. and INI file  keywords.  Both  are  explained  in  detail  in  the  following
  364. sections.
  365.  
  366. 2.1.1            Command Line Switches
  367.  
  368. Command line switches consist of a + (plus) or - (minus)  sign,  followed  by
  369. one or more alphabetic characters and possibly a numeric  value.  Here  is  a
  370. typical command line with switches.
  371.  
  372.   POVRAY +Isimple.pov +V +W80 +H60
  373.  
  374.  
  375. POVRAY is the name of the program and it is  followed  by  several  switches.
  376. Each switch begins with a plus or minus sign. The +I switch with the filename
  377. tells POV-Ray what scene file it should use as input and +V tells the program
  378. to output its status to the text screen  as  it's  working.  The  +W  and  +H
  379. switches set the width and height of the image in pixels. This image will  be
  380. 80 pixels wide by 60 pixels high.
  381.  
  382. In switches which toggle a feature, the plus turns it on and minus  turns  it
  383. off. For example +P turns on the "pause for keypress  when  finished"  option
  384. while -P turns it off. Other switches are used to specify values and  do  not
  385. toggle a feature. Either plus or minus may be  used  in  that  instance.  For
  386. example +W320 sets the width to 320 pixels. You could also use -W320 and  get
  387. the same results.
  388.  
  389. Switches may be specified in upper or lower case. They are read left to right
  390. but in general may be specified in any order. If you specify  a  switch  more
  391. than once,  the  previous  value  is  generally  overwritten  with  the  last
  392. specification. The only exception is the +L switch for setting library paths.
  393. Up to ten unique paths may be specified.
  394.  
  395. Almost all +/- switches have an equivalent option which can be used in an INI
  396. file which is described in the next section. A detailed description  of  each
  397. switch is given in the option reference section.
  398.  
  399. 2.1.2            Using INI Files
  400.  
  401. Because it is difficult to set more than a few options on a command line, you
  402. have the ability to put multiple options in one or  more  text  files.  These
  403. initialization files or INI files  have  .INI  as  their  default  extension.
  404. Previous versions of POV-Ray called them default files or DEF files. You  may
  405. still use existing DEF files with this version of POV-Ray.
  406.  
  407. The majority of options you use will be stored in INI files. The command line
  408. switches are recommended for options which you will turn off or on frequently
  409. as you perform test renderings of  a  scene  you  are  developing.  The  file
  410. POVRAY.INI is automatically read if present. You may specify  additional  INI
  411. files on the command-line by simply typing the file name on the command line.
  412. For example:
  413.  
  414.   POVRAY MYOPTS.INI
  415.  
  416.  
  417. If no extension is given, then .ini is assumed. POV-Ray knows this is  not  a
  418. switch because it is not preceded by a plus or minus. In fact a common  error
  419. among new users is they forget to put the +I switch  before  the  input  file
  420. name. Without the switch, POV-Ray thinks that the scene file simple.pov is an
  421. INI file. Don't forget! If no plus or minus precedes a command  line  switch,
  422. it is assumed to be an INI file name.
  423.  
  424. You may have multiple INI files on the command line along with switches.  For
  425. example:
  426.  
  427.   POVRAY MYOPTS +V OTHER
  428.  
  429.  
  430. This reads options from MYOPTS.INI, then  sets  the  +V  switch,  then  reads
  431. options from OTHER.INI.
  432.  
  433. An INI file is a plain ASCII text file with options of the form...
  434.  
  435.   Option_keyword=VALUE ; Text after semicolon is a comment
  436.  
  437.  
  438. For example the INI equivalent of the switch +Isimple.pov is..
  439.  
  440.   Input_File_Name=simple.pov
  441.  
  442.  
  443. Options are read top to bottom in the file but in general may be specified in
  444. any order. If you specify an option more than once, the previous  values  are
  445. generally overwritten with the last specification. The only exception is  the
  446. Library_Path=PATH options. Up to ten unique paths may be specified.
  447.  
  448. Almost all  INI-style  options  have  equivalent  +/-  switches.  The  option
  449. reference section gives a detailed description of  all  POV-Ray  options.  It
  450. includes both the INI-style settings and the +/- switches.
  451.  
  452. The INI keywords are not case sensitive. Only one INI option is permitted per
  453. line of text. You may also include switches in your  INI  file  if  they  are
  454. easier for you. You may have multiple switches per line but  you  should  not
  455. mix switches and INI options on the same line. You  may  nest  INI  files  by
  456. simply putting the file name on a line by itself with no  equals  sign  after
  457. it. Nesting may occur up to ten levels deep.
  458.  
  459. For example:
  460.  
  461.   ; This is a sample INI file. This entire line is a comment.
  462.   ; Blank lines are permitted.
  463.  
  464.   Input_File_Name=simple.pov ;This sets the input file name
  465.  
  466.   +W80 +H60 ; Traditional +/- switches are permitted too
  467.  
  468.   MOREOPT   ; Read MOREOPT.INI and continue with next line
  469.  
  470.   +V        ; Another switch
  471.  
  472.   ; That's all folks!
  473.  
  474.  
  475. INI files may have labeled sections so that more than one set of options  may
  476. be stored in a single file. Each section begins with a label in []  brackets.
  477. For example:
  478.  
  479.   ; RES.INI
  480.   ; This sample INI file is used to set resolution.
  481.  
  482.   +W120 +H100  ; This section has no label.
  483.                ; Select it with "RES"
  484.  
  485.   [Low]
  486.   +W80 +H60    ; This section has a label.
  487.                ; Select it with "RES[Low]"
  488.  
  489.   [Med]
  490.   +W320 +H200  ; This section has a label.
  491.                ; Select it with "RES[Med]"
  492.  
  493.   [High]
  494.   +W640 +H480  ; Labels are not case sensitive.
  495.                ; "RES[high]" works
  496.  
  497.   [Really High]
  498.   +W800 +H600  ; Labels may contain blanks
  499.  
  500.  
  501. When you specify the INI file you should follow it with the section label  in
  502. brackets. For example...
  503.  
  504.   POVRAY RES[Med] +Imyfile.pov
  505.  
  506.  
  507. POV-Ray reads RES.INI and skips all options until it find the label [Med]. It
  508. processes options after that label until it finds another label and  then  it
  509. skips. If no label is specified on the command line then only  the  unlabeled
  510. area at the top of the file is read. If a label is specified,  the  unlabeled
  511. area is ignored.
  512.  
  513. 2.1.3            Using the POVINI Environment Variable
  514.  
  515. The environment variable POVINI is used to specify the location and name of a
  516. default INI file that is read every time POV-Ray is executed.  If  POVINI  is
  517. not specified a default INI file may be read depending on the platform  used.
  518. If the specified file does not exist a warning message is printed.
  519.  
  520. To set the environment variable under MS-DOS you might put the following line
  521. in your AUTOEXEC.BAT file...
  522.  
  523.   set POVINI=c:\povray3\default.ini
  524.  
  525.  
  526. On most operating systems the sequence of reading options is as follows:
  527.  
  528.   1. Read options from default INI file specified by the  POVINI  environment
  529.      variable or platform specific INI file.
  530.   2. Read switches from command line (this  includes  reading  any  specified
  531.      INI/DEF files).
  532.  
  533.  
  534. The POVRAYOPT environment variable supported by previous POV-Ray versions  is
  535. no longer available.
  536.  
  537. 2.2              Options Reference
  538.  
  539. As explained in the previous section, options may be specified by switches or
  540. INI-style options. Almost all INI-style options have equivalent +/-  switches
  541. and most switches have equivalent INI-style option.  The  following  sections
  542. give a detailed description of each POV-Ray  option.  It  includes  both  the
  543. INI-style settings and the +/- switches.
  544.  
  545. The notation and terminology used is described in the tables below.
  546.  
  547.   Keyword=bool  turn Keyword on if bool equals true, yes, on or 1 and turn it
  548.                 off if it is any other value.
  549.   Keyword=true  do this option if true, yes, on or 1 is specified.
  550.   Keyword=false do this option if false, no, off or 0 is specified.
  551.   Keyword=file  any valid file name. Note: some options prohibit the  use  of
  552.                 any of the above true or false values as a  file  name.  They
  553.                 are noted in later sections.
  554.  
  555.  
  556.   n     any integer such as +w320
  557.   n.n   any float such as Clock=3.45
  558.   0.n   any float < 1.0 even if it has no leading 0
  559.   s     any string of text
  560.   xor y any single character
  561.   path  any directory name, drive optional, no final path separator  ("\"  or
  562.         "/", depending on the operating system)
  563.  
  564.  
  565. Unless otherwise specifically noted, you may assume that  either  a  plus  or
  566. minus sign before a switch will produce the same results.
  567.  
  568. 2.2.1            Animation Options
  569.  
  570. POV-Ray 3.0 greatly improved its animation capability with the addition of an
  571. internal animation loop, automatic output file name numbering and the ability
  572. to shell out to the operating system to external utilities which can assemble
  573. individual frames into an animation. The internal animation  loop  is  simple
  574. yet flexible. You may still use external programs or batch  files  to  create
  575. animations without the internal loop as you may have done in POV-Ray 2.
  576.  
  577. 2.2.1.1          External Animation Loop
  578.  
  579.   Clock=n.n Sets "clock" float identifier to n.n
  580.   +Kn.n     Same as Clock=n.n
  581.  
  582.  
  583. The Clock=nn.nnn option or the +Knn.nnn switch may be used to pass  a  single
  584. float value to the program for basic animation. The value is  stored  in  the
  585. float identifier clock. If an object had a rotate <0,clock,0>  attached  then
  586. you could rotate the object by different amounts  over  different  frames  by
  587. setting +K10.0, +K20.0... etc. on successive renderings. It is up to the user
  588. to repeatedly invoke POV-Ray with a different Clock= value  and  a  different
  589. Output_File_Name= for each frame.
  590.  
  591. 2.2.1.2          Internal Animation Loop
  592.  
  593.   Initial_Frame=n   Sets initial frame number to n
  594.   Final_Frame=n     Sets final frame number
  595.   Initial_Clock=n.n Sets initial clock value
  596.   Final_Clock=n.n   Sets final clock value
  597.   +KFIn             Same as Initial_Frame=n
  598.   +KFFn             Same as Final_Frame=n
  599.   +KIn.n            Same as Initial_Clock=n.n
  600.   +KFn.n            Same as Final_Clock=n.n
  601.  
  602.  
  603. The internal animation loop new to POV-Ray 3.0 relieves the user of the  task
  604. of generating complicated sets of batch  files  to  invoke  POV-Ray  multiple
  605. times with different settings.  While  the  multitude  of  options  may  look
  606. intimidating, the clever set of defaults values means that you will  probably
  607. only need to specify the Final_Frame=nnn option or the +KFFnnn to specify the
  608. number of frames. All other values may remain at their defaults.
  609.  
  610. Any Final_Frame  setting  other  than  -1  will  trigger  POV-Ray's  internal
  611. animation loop. For example Final_Frame=10 or +KFF10 causes POV-Ray to render
  612. your scene 10 times. If you  specified  Output_File_Name=FILE.TGA  then  each
  613. frame would be output as FILE01.TGA, FILE02.TGA, FILE03.TGA etc.  The  number
  614. of zero-padded digits in the file name depends upon the final  frame  number.
  615. For example +KFF100 would generate FILE001.TGA through FILE100.TGA. The frame
  616. number may encroach upon the file name. On MS-DOS with an 8 character  limit,
  617. MYSCENE.POV would render to MYSCE001.TGA through MYSCE100.TGA.
  618.  
  619. The default Initial_Frame=1 will probably never have to be changed. You would
  620. only change it if you were assembling a long animation  sequence  in  pieces.
  621. One scene might run from frame 1 to 50 and the  next  from  51  to  100.  The
  622. Initial_Frame=nnn or +KFInnn option is for this purpose.
  623.  
  624. Note that if you wish to render a subset of frames such as 30 through 40  out
  625. of a 1 to 100 animation, you should not change Frame_Initial or  Frame_Final.
  626. Instead you should use the subset commands described in Subsets of  Animation
  627. Frames .
  628.  
  629. Unlike some animation packages, the action in POV-Ray  animated  scenes  does
  630. not depend upon the integer frame numbers.  Rather  you  should  design  your
  631. scenes based upon the float identifier clock. By default, the clock value  is
  632. 0.0 for the initial frame and 1.0 for the final frame. All other  frames  are
  633. interpolated between these values. For example if your object is supposed  to
  634. rotate one full turn over the course of  the  animation,  you  could  specify
  635. rotate 360*clock*y Then as clock runs from 0.0 to  1.0,  the  object  rotates
  636. about the y-axis from 0 to 360 degrees.
  637.  
  638. The major advantage to this  system  is  that  you  can  render  a  10  frame
  639. animation or a 100 frame or 500 frame or 329 frame animation  yet  you  still
  640. get one full 360 degree rotation. Test renders of a few frames  work  exactly
  641. like final renders of many frames.
  642.  
  643. In effect you define the motion over a continuous float valued parameter (the
  644. clock) and you take discrete samples at some fixed intervals (the frames). If
  645. you take a movie or video tape a  real  scene  it  works  the  same  way.  An
  646. object's actual motion depends only on time. It does not depend on the  frame
  647. rate of your camera.
  648.  
  649. Many users have already created scenes for POV-Ray 2 that expect clock values
  650. over a range other than the default 0.0 to 1.0. For this  reason  we  provide
  651. the Initial_Clock=nn.nnn or +KInn.nnn  and  Final_Clock=nn.nnn  or  +KFnn.nnn
  652. options. For example to run the clock from 25.0 to  75.0  you  would  specify
  653. Initial_Clock=25.0 and Final_Clock=75.0. Then the clock would be set to  25.0
  654. for the initial frame and 75.0 for the final frame. In between  frames  would
  655. have clock values interpolated from 25.0 through 75.0 proportionally.
  656.  
  657. Users who are accustomed to using frame  numbers  rather  than  clock  values
  658. could specify Initial_Clock=1.0 and Final_Clock=10.0 and Frame_Final=10 for a
  659. 10 frame animation.
  660.  
  661. For new  scenes,  we  recommend  you  do  not  change  the  Initial_Clock  or
  662. Final_Clock from their default 0.0 to 1.0 values. If you want  the  clock  to
  663. vary over a different range than the default 0.0 to  1.0,  we  recommend  you
  664. handle this inside your scene file as follows...
  665.  
  666.   #declare Start    = 25.0
  667.   #declare End      = 75.0
  668.   #declare My_Clock = Start+(End-Start)*clock
  669.  
  670.  
  671. Then use My_Clock in the scene description. This keeps  the  critical  values
  672. 25.0 and 75.0 in your .POV file.
  673.  
  674. Note that more details concerning the inner workings of  the  animation  loop
  675. are in the section on shell-out operating system commands  in  "Shell-out  to
  676. Operating System" .
  677.  
  678. 2.2.1.3          Subsets of Animation Frames
  679.  
  680.   Subset_Start_Frame=n   Set subset starting frame to n
  681.   Subset_Start_Frame=0.n Set subset starting frame to n percent
  682.   Subset_End_Frame=n     Set subset ending frame to n
  683.   Subset_End_Frame=0.n   Set subset ending frame to n percent
  684.   +SFn or +SF0.n         Same as Subset_Start_Frame
  685.   +EFn or +EF0.n         Same as Subset_End_Frame
  686.  
  687.  
  688. When creating a long animation, it may be handy to render only a  portion  of
  689. the animation to see what it looks like. Suppose you have 100 frames but only
  690. want  to  test  render  30  through  40.  If  you  set  Initial_Frame=30  and
  691. Final_Frame=40 then the clock would vary from  0.0  to  1.0  from  frames  30
  692. through 40 rather than 0.30 through 0.40 as it should. Therefore  you  should
  693. leave Initial_Frame=1 and Final_Frame=100 and use  Subset_Start_Frame=30  and
  694. Subset_End_Frame=40 to selectively render part of  the  scene.  POV-Ray  will
  695. then properly compute the clock values.
  696.  
  697. Usually you will specify the subset using the actual  integer  frame  numbers
  698. however an alternate form of the subset commands takes a float value  in  the
  699. range, 0.0 <= n.nnn < 1.0 which is interpreted as a  fraction  of  the  whole
  700. animation. For example, Subset_Start_Frame=0.333  and  Subset_End_Frame=0.667
  701. would render the middle 1/3rd of a  sequence  regardless  of  the  number  of
  702. frames.
  703.  
  704. 2.2.1.4          Cyclic Animation
  705.  
  706.   Cyclic_Animation=bool Turn cyclic animation on/off
  707.   +KC                   Turn cyclic animation on
  708.   -KC                   Turn cyclic animation off
  709.  
  710.  
  711. Many computer animation sequences are designed to  be  run  in  a  continuous
  712. loop. Suppose you have an object that rotates exactly 360  degrees  over  the
  713. course of your animation and you did rotate 360*clock*y to do  so.  Both  the
  714. first and last frames would be identical. Upon  playback  there  would  be  a
  715. brief one frame jerkiness. To eliminate this  problem  you  need  adjust  the
  716. clock so that the last frame does not match the  first.  For  example  a  ten
  717. frame cyclic animation should not use clock 0.0 to 1.0. It  should  run  from
  718. 0.0 to 0.9 in 0.1 increments. However if you change to 20  frames  it  should
  719. run from 0.0 to 0.95 in 0.05 increments. This complicates things because  you
  720. would  have  to  change  the  final  clock  value  every  time  you  changed
  721. Final_Frame. Setting the Cyclic_Animation=On option or  the  +KC  will  cause
  722. POV-Ray to automatically adjust the final clock value  for  cyclic  animation
  723. regardless of how many total frames. The default value for  this  setting  is
  724. off.
  725.  
  726. 2.2.1.5          Field Rendering
  727.  
  728.   Field_Render=bool Turn field rendering on/off
  729.   Odd_Field=bool    Set odd field flag
  730.   +UF               Turn field rendering on
  731.   -UF               Turn field rendering off
  732.   +UO               Set odd field flag on
  733.   -UO               Set odd field flag off
  734.  
  735.  
  736. Field rendering is sometimes used for animations when the animation is  being
  737. output for television. TVs only display alternate scan lines on each vertical
  738. refresh. When each frame is being displayed the fields are interlaced to give
  739. the impression of a higher resolution image. The even scan lines make up  the
  740. even field, and are drawn first (i.e. scan lines 0, 2, 4, etc),  followed  by
  741. the odd field, made up of the odd numbered scan lines are  drawn  afterwards.
  742. If objects in an animation are moving  quickly,  their  position  can  change
  743. noticably from one field to the next. As a result, it  may  be  desirable  in
  744. these cases to have POV-Ray render alternate fields at the actual field  rate
  745. (which is twice the frame rate), rather than rendering  full  frames  at  the
  746. normal frame rate. This would save a great deal of time compared to rendering
  747. the entire animation at twice the frame rate, and then  only  using  half  of
  748. each frame.
  749.  
  750. By default, field rendering is not used. Setting Field_Render=on or using +UF
  751. will cause alternate frames in an animation to be only the even or odd fields
  752. of an animation. By default, the first frame is the even field,  followed  by
  753. the odd field. You can have POV-Ray render the odd field first by  specifying
  754. Odd_Field=on, or by using the +UO switch.
  755.  
  756. 2.2.2            Output Options
  757.  
  758.  
  759. 2.2.2.1          General Output Options
  760.  
  761.  
  762. 2.2.2.1.1        Height and Width of Output
  763.  
  764.   Height=n Set screen height to n
  765.   Width=n  Sets screen width to n pixels.
  766.   +Hn      Same as Height=n (when n > 8)
  767.   +Wn      Same as Width=n
  768.  
  769.  
  770. These switches set the  height  and  width  of  the  image  in  pixels.  This
  771. specifies the image size for file output. The preview display,  if  on,  will
  772. generally attempt to pick a video mode  to  accommodate  this  size  but  the
  773. display settings do not in any way affect the resulting file output.
  774.  
  775. 2.2.2.1.2        Partial Output Options
  776.  
  777.   Start_Column=n   Set first column to n
  778.   Start_Column=0.n Set first column to n percent of width
  779.   +SCn or +SC0.n   Same as Start_Column
  780.   Start_Row=n      Set first row to n pixels
  781.   Start_Row=0.n    Set first row to n percent of height
  782.   +SRn or +Sn      Same as Start_Row=n
  783.   +SR0.n or +S0.n  Same as Start_Row=0.n
  784.   End_Column=n     Set last column to n pixels
  785.   End_Column=0.n   Set last column to n percent of width
  786.   +ECn or +EC0.n   Same as End_Column
  787.   End_Row=n        Set last row to n pixels
  788.   End_Row=0.n      Set last row to n percent of height
  789.   +ERn or +En      Same as End_Row=n
  790.   +ER0.n or +E0.n  Same as End_Row=0.n
  791.  
  792.  
  793. When doing  test  rendering  it  is  often  convenient  to  define  a  small,
  794. rectangular sub-section of the whole screen so you can quickly check out  one
  795. area of the  image.  The  Start_Row,  End_Row,  Start_Column  and  End_Column
  796. options allow you to define the subset  area  to  be  rendered.  The  default
  797. values are the full size of the image from (1,1) which is the upper  left  to
  798. (w,h) on the lower right where w and  h  are  the  Width=nnn  and  Height=nnn
  799. values you have set.
  800.  
  801. Note if the number specified is greater than 1 then it is interpreted  as  an
  802. absolute row or column number in pixels. If it is a decimal value between 0.0
  803. and 1.0 then it is interpreted as a percent of the total width or  height  of
  804. the image. For example: Start_Row=0.75 and Start_Column=0.75 starts on a  row
  805. 75% down from the top at a column 75% from the left. Thus it renders only the
  806. lower-right 25% of the image regardless of the specified width and height.
  807.  
  808. The +SR, +ER, +SC and  +EC  switches  work  the  same  as  the  corresponding
  809. INI-style settings for both absolute settings or percentages. Early  versions
  810. of POV-Ray allowed only start and end rows to be  specified  with  +Snnn  and
  811. +Ennn so they are still supported in addition to +SR and +ER.
  812.  
  813. 2.2.2.1.3        Interrupting Options
  814.  
  815.   Test_Abort=bool    Turn test for user abort on/off
  816.   +X                 Turn test abort on
  817.   -X                 Turn test abort off
  818.   Test_Abort_Count=n Set to test for abort every n pixels
  819.   +Xn                Set to test for abort every n pixels on
  820.   -Xn                Set to test for  abort  off  (in  future  test  every  n
  821.                      pixels)
  822.  
  823.  
  824. On some operating systems once you start a rendering you must let it  finish.
  825. The Test_Abort=on option or +X switch causes POV-Ray to test the keyboard for
  826. keypress. If you have pressed a key,  it  will  generate  a  controlled  user
  827. abort. Files will be flushed and closed but only data through the  last  full
  828. row of pixels is saved. POV-Ray exits with an error code 2. (Normally POV-Ray
  829. returns 0 for a successful run or 1 for a fatal error.)
  830.  
  831. When this option is on, the keyboard is polled on every  line  while  parsing
  832. the scene file and on  every  pixel  while  rendering.  Because  polling  the
  833. keyboard can slow down a rendering, the Test_Abort_Count=nnn option or  +Xnnn
  834. switch causes the test to be performed only  every  nnn  pixels  rendered  or
  835. scene lines parsed.
  836.  
  837. 2.2.2.1.4        Resuming Options
  838.  
  839.   Continue_Trace=bool Sets continued trace on/off
  840.   +C                  Sets continued trace on
  841.   -C                  Sets continued trace off
  842.   Create_Ini=file     Generate an INI file to file
  843.   Create_Ini=true     Generate file.ini where file is scene name.
  844.   Create_Ini=false    Turn off generation of previously set file.ini
  845.   +GIsss              Same as Create_Ini=sss
  846.  
  847.  
  848. If you abort a render while it's in progress  or  if  you  used  the  End_Row
  849. option to end the  render  prematurely,  you  can  use  Continue_Trace=on  or
  850. {/HIW}+C option to continue the render later at the point where you left off.
  851. This option reads in the  previously  generated  output  file,  displays  the
  852. partial image rendered so far, then  proceeds  with  the  ray  tracing.  This
  853. option cannot be used if file output is disabled with  Output_to_file=off  or
  854. -F.
  855.  
  856. The Continue_Trace option may not work if the Start_Row option has  been  set
  857. to anything but the top of the file, depending on  the  output  format  being
  858. used.
  859.  
  860. POV-Ray tries to figure out where to resume an interrupted trace  by  reading
  861. any previously generated data in the specified output file. All file  formats
  862. contain the image size,  so  this  will  override  any  image  size  settings
  863. specified. Some file formats (namely TGA  and  PNG)  also  store  information
  864. about where the file started (i.e. +SCn and +SRn  options),  alpha  output  (
  865. +UA), and bit-depth ( +FNn), which will override these settings. It is up  to
  866. the user to see to it that all other options are set the same as the original
  867. render.
  868.  
  869. The Create_Ini option or +GI switch provides an easy way  to  create  an  INI
  870. file with all of the rendering options, so you can re-run files with the same
  871. options, or ensure you have all the same options when resuming.  This  option
  872. creates an INI file with  every  option  set  at  the  value  used  for  that
  873. rendering. This includes default values which you  have  not  specified.  For
  874. example if you run POV-Ray with...
  875.  
  876.   POVRAY +Isimple.pov MYOPTS +GIrerun.ini MOREOPTS
  877.  
  878.  
  879. POV-Ray will create a file called rerun.ini with all of the options  used  to
  880. generate this scene. The file is not written  until  all  options  have  been
  881. processed. This means that in  the  above  example,  the  file  will  include
  882. options from both MYOPTS.INI and MOREOPTS.INI despite the fact that  the  +GI
  883. switch is specified between them. You may now re-run the scene with...
  884.  
  885.   POVRAY RERUN
  886.  
  887.  
  888. or resume an interrupted trace with
  889.  
  890.   POVRAY RERUN +C
  891.  
  892.  
  893. If you add other switches with the RERUN.INI reference, they will be included
  894. in future re-runs because the file is re-written every time you use it.
  895.  
  896. The Create_Ini option  is  also  useful  for  documenting  how  a  scene  was
  897. rendered. If you render WAYCOOL.POV with Create_Ini=true then it will  create
  898. a file WAYCOOL.INI that you could distribute this file along with your  scene
  899. file so other users can exactly re-create your image.
  900.  
  901. 2.2.2.2          Display Output Options
  902.  
  903.  
  904. 2.2.2.2.1        Display Hardware Settings
  905.  
  906.   Display=bool      Turns graphic display on/off
  907.   +D                Turns graphic display on
  908.   -D                Turns graphic display off
  909.   Video_Mode=x      Set video mode to 'x'; does not affect on/off
  910.   +Dx               Set display on; Set mode to 'x'
  911.   -Dx               Set display off; but for future use mode 'x'
  912.   Palette=y         Set display palette to 'y'; does not affect on/off
  913.   +Dxy              Set display on; Set mode 'x'; Set palette 'y'
  914.   -Dxy              Set display off; use mode 'x', palette 'y' in future
  915.   Display_Gamma=n.n Sets the display gamma to n.n
  916.  
  917.  
  918. The Display=on or +D switch will turn on the graphics display  of  the  image
  919. while it is being rendered. Even on some non-graphics  systems,  POV-Ray  may
  920. display an 80 by 24  character  "ASCII-Art"  version  of  your  image.  Where
  921. available, the display may be full, 24-bit true color. Setting Display=off or
  922. -D switch will turn off the graphics display which is the default.
  923.  
  924. The Video_Mode=x option sets the display mode or hardware type chosen where x
  925. is a single digit or letter that is machine dependent. Generally Video_Mode=0
  926. means the default setting or an auto-detected setting should  be  used.  When
  927. using switches, this character immediately follows the  switch.  For  example
  928. the +D0 switch will turn on the graphics display in the default mode.
  929.  
  930. The Palette=y option selects the palette to be  used.  Typically  the  single
  931. character parameter y is a digit which selects one of several fixed  palettes
  932. or a letter such G for gray scale, H for 15- bit high color or T  for  24-bit
  933. true color. When using switches, this character is the  2nd  character  after
  934. the switch. For example the +D0T switch will turn on the graphics display  in
  935. the default mode with a true color palette.
  936.  
  937. The Display_Gamma=n.n setting is new with POV-Ray 3.0, and is  not  available
  938. as a command-line switch. The Display_Gamma setting overcomes the problem  of
  939. images (whether ray-traced or not) having  different  brightness  when  being
  940. displayed on different monitors, different video cards, and  under  different
  941. operating systems. Note that the Display_Gamma is a  setting  based  on  your
  942. computer's display hardware,  and  should  be  set  correctly  once  and  not
  943. changed. The Display_Gamma INI setting works  in  conjunction  with  the  new
  944. assumed_gamma global setting to ensure that POV scenes and  the  images  they
  945. create look the same  on  all  systems.  See  section  "Assumed_Gamma"  which
  946. describes  the  assumed_gamma  global  setting,  and  describes  gamma  more
  947. thoroughly.
  948.  
  949. While the Display_Gamma can be different for each system,  there  are  a  few
  950. general rules that can be used for setting Display_Gamma if you don't know it
  951. exactly. If the Display_Gamma keyword  does  not  appear  in  the  INI  file,
  952. POV-Ray assumes that the display gamma  is  2.2.  This  is  because  most  PC
  953. monitors have a gamma value in the range 1.6 to 2.6  (newer  models  seem  to
  954. have a lower gamma value). MacOS has  the  ability  to  do  gamma  correction
  955. inside the system software (based on a user  setting  in  the  gamma  control
  956. panel). If the gamma control panel is turned off, or is  not  available,  the
  957. default Macintosh system gamma is 1.8. Some high-end PC graphics  cards,  can
  958. do hardware gamma  correction,  and  should  use  the  current  Display_Gamma
  959. setting, usually 1.0. A gamma test image is also available to help  users  to
  960. set their Display_Gamma accurately.
  961.  
  962. For scene files  that  do  not  have  an  assumed_gamma  global  setting  the
  963. Display_Gamma will not have any affect on the preview output  of  POV-Ray  or
  964. for most output file formats. However, the Display_Gamma value is  used  when
  965. creating PNG format output files, and also when rendering the POV-Ray example
  966. files (because they have an assumed_gamma), so it should still  be  correctly
  967. set for your system to ensure proper results.
  968.  
  969. 2.2.2.2.2        Display Related Settings
  970.  
  971.   Pause_When_Done=bool Sets pause when done on/off
  972.   +P                   Sets pause when done on
  973.   -P                   Sets pause when done off
  974.   Verbose=bool         Set verbose messages on/off
  975.   +V                   Set verbose messages on
  976.   -V                   Set verbose messages off
  977.   Draw_Vistas=bool     Turn draw vistas on/off
  978.   +UD                  Turn draw vistas on
  979.   -UD                  Turn draw vistas off
  980.  
  981.  
  982. On some systems, when the image is complete, the graphics display is  cleared
  983. and POV-Ray switches back into text mode to print the final statistics and to
  984. exit. Normally when the graphics display is on, you want to look at the image
  985. awhile before continuing. The Pause_When_Done=on or +P switch causes  POV-Ray
  986. to pause in graphics mode until you to press a key to continue.  The  default
  987. is off or -P.
  988.  
  989. When the graphics display is not used,  it  is  often  desirable  to  monitor
  990. progress of the rendering. The Verbose=on  or  +V  switch  turns  on  verbose
  991. reporting of your rendering progress. This reports the  number  of  the  line
  992. currently  being  rendered,  the  elapsed  time  for  this  frame  and  other
  993. information. On some systems, this textual information can conflict with  the
  994. graphics display. You may need to turn this off when the display is  on.  The
  995. default setting is off or -V.
  996.  
  997. The option Draw_Vistas=on or +UD  was  originally  a  debugging  feature  for
  998. POV-Ray's vista buffer feature but it was such fun we  decided  to  keep  it.
  999. Vista buffering is a  spatial  sub-division  method  that  projects  the  2-D
  1000. extents of bounding boxes onto the viewing window. POV-Ray tests the 2-D  x,y
  1001. pixel location against these rectangular areas  to  determine  quickly  which
  1002. objects, if any, the viewing ray will hit. This  option  shows  you  the  2-D
  1003. rectangles used. The default setting is off or - UD because  the  drawing  of
  1004. the rectangles can take considerable time on complex scenes and it serves  no
  1005. critical purpose. See vista buffers for more details.
  1006.  
  1007. 2.2.2.2.3        Mosaic Preview
  1008.  
  1009.   Preview_Start_Size=n Set mosaic preview start size to n
  1010.   +SPn                 Same as Preview_Start_Size=n
  1011.   Preview_End_Size=n   Set mosaic preview end size to n
  1012.   +EPn                 Same as Preview_End_Size=n
  1013.  
  1014.  
  1015. Typically while you are developing a scene, you will do many  low  resolution
  1016. test renders to see if objects are placed properly. Often the low res version
  1017. doesn't give you sufficient detail and you have to start  over  at  a  higher
  1018. resolution.  A  feature  called  mosaic  preview  solves  this  problem   by
  1019. automatically rendering your image in several passes. The early passes give a
  1020. rough overview of the entire image using large blocks of  pixels  that  looks
  1021. like mosaic tile. The image  is  then  refined  using  higher  resolution  on
  1022. subsequent passes. When sufficient resolution has been reached, you can  stop
  1023. the process or you can let it finish the image at full resolution.
  1024.  
  1025. To use this feature you should select a Width and Height value  that  is  the
  1026. highest resolution you will need. Mosaic preview is enabled by specifying how
  1027. big the mosaic blocks will be on the first pass using  Preview_Start_Size=nnn
  1028. or +SPnnn. The value nnn should be a number greater than zero that is a power
  1029. of two (1,2,4,8,16,32, etc.) If it is not a power of 2, the nearest power  of
  1030. 2 less than nnn is substituted. This sets the size of the  squares,  measured
  1031. in pixels. A value of 16 will draw every 16th pixel as a 16x16  pixel  square
  1032. on the first pass. Subsequent passes will use half that value  such  as  8x8,
  1033. 4x4 and so on.
  1034.  
  1035. The process continues until it reaches 1x1 pixels or  until  it  reaches  the
  1036. size you set with Preview_End_Size=nnn or +EPnnn. Again the value nnn  should
  1037. be a number greater than zero that is a power of 2. If it is not a  power  of
  1038. 2, the nearest power of 2 less than nnn is substituted.  The  default  ending
  1039. value is 1.
  1040.  
  1041. No file output is performed until the final 1x1 pass is reached. Although the
  1042. preliminary passes render only  as  many  pixels  as  needed,  the  1x1  pass
  1043. re-renders every pixel so that anti-aliasing and  file  output  streams  work
  1044. properly. This makes the scene take 25% longer than usual to render so it  is
  1045. recommended that mosaic preview not be used for  final  rendering.  Also  the
  1046. lack of file output until the final pass  means  that  renderings  which  are
  1047. interrupted before the 1x1 pass may not be resumed without starting over from
  1048. the beginning. Future  versions  of  POV-Ray  will  include  some  system  of
  1049. temporary files or buffers which  will  eliminate  these  inefficiencies  and
  1050. limitations. Mosaic preview is still a useful feature for test renderings.
  1051.  
  1052. 2.2.2.3          File Output Options
  1053.  
  1054.  
  1055. 2.2.2.3.1        Output File Type
  1056.  
  1057.   Output_to_File=bool   Sets file output on/off
  1058.   +F                    Sets file output on (use default type)
  1059.   -F                    Sets file output off
  1060.   Output_File_Type=x    Sets file output format to 'x'
  1061.   +Fxn                  Sets file output on; sets format 'x', depth 'n'
  1062.   -Fxn                  Sets file output off; but in future use  format  'x',
  1063.                         depth 'n'
  1064.   Output_Alpha=bool     Sets alpha output on/off
  1065.   +UA                   Sets alpha output on
  1066.   -UA                   Sets alpha output off
  1067.   Output_File_Name=file Sets output file to file
  1068.   +Ofile                Same as Output_File_Name=file
  1069.   Buffer_Output=bool    Turn output buffering on/off
  1070.   +B                    Turn output buffering on
  1071.   -B                    Turn output buffering off
  1072.   Buffer_Size=n         Set output buffer size to  'n'  kilobytes.  If  n  is
  1073.                         zero, no buffering. If n < system default, the system
  1074.                         default is used.
  1075.   +Bn                   Turn buffer on, set size n
  1076.   -Bn                   Turn buffer off, but for future set size n
  1077.   Bits_Per_Color=n      Sets file output bits/color to 'n'
  1078.  
  1079.  
  1080. By default, POV-Ray writes an image file to disk. When you are  developing  a
  1081. scene and doing test renders, the graphic preview may be sufficient. To  save
  1082. time and disk activity you may turn file output off  with  Output_to_File=off
  1083. or -F.
  1084.  
  1085. The default type of image file depends  on  which  platform  you  are  using.
  1086. MS-DOS and most  others  default  to  24-bit  uncompressed  Targa.  See  your
  1087. platform-specific documentation to see what your default file  type  is.  You
  1088. may select one of several different file types  using  Output_File_Type=x  or
  1089. +Fx where x is one of the following...
  1090.  
  1091.   +FC Compressed Targa-24 format (RLE, run length encoded)
  1092.   +FN New PNG (portable network graphics) format
  1093.   +FP Unix PPM format
  1094.   +FS System-specific such as Mac Pict or Windows BMP
  1095.   +FT Uncompressed Targa-24 format
  1096.  
  1097.  
  1098. Note that the obsolete +FD dump format and +FR raw format have  been  dropped
  1099. from POV-Ray 3.0 because they were rarely used and no longer necessary.  PPM,
  1100. PNG, and system specific formats have  been  added.  PPM  format  images  are
  1101. uncompressed, and have a simple text header, which makes it a widely portable
  1102. image format. PNG is a new image format designed not only to replace GIF, but
  1103. to improve on its shortcomings. PNG offers the highest compression  available
  1104. without loss for high quality applications, such as ray-tracing.  The  system
  1105. specific  format  depends  on  the  platform  used  and  is  covered  in  the
  1106. appropriate system specififc documentation.
  1107.  
  1108. Most of these formats output 24 bits per pixel with 8 bits for each  of  red,
  1109. green and blue data. PNG allows you to  optionally  specify  the  output  bit
  1110. depth, from 5 to 16 bits for each of the red, green, and blue colors,  giving
  1111. from 15 to 48 bits of color information per pixel. The default  output  depth
  1112. for all formats is 8 bits/color (16 million possible colors), but this may be
  1113. changed for PNG format files by setting  Bits_Per_Color=n  or  by  specifying
  1114. +FNn, where n is the desired bit depth.
  1115.  
  1116. Specifying a smaller color depth like 5  bits/color  (32768  colors)  may  be
  1117. enough for people with 8- or 16-bit (256 or 65536 color) displays,  and  will
  1118. improve compression of the PNG file. Higher bit depths like 10 or 12  may  be
  1119. useful for video or publishing applications, and 16 bits/color  is  good  for
  1120. grayscale height field output (See section  "Height  Field"  for  details  on
  1121. height fields).
  1122.  
  1123. Targa format also allows 8 bits of alpha  transparency  data  to  be  output,
  1124. while PNG format allows 5 to 16 bits of alpha transparency data, depending on
  1125. the color bit depth as specified above. You may  turn  this  option  on  with
  1126. Output_Alpha=on or +UA. The default is off or -UA.  See  section  "Using  the
  1127. Alpha Channel" for further details on transparency.
  1128.  
  1129. In addition to support for variable bit-depths, alpha channel, and  grayscale
  1130. formats, PNG files also store the Display_Gamma value so the  image  displays
  1131. properly on all systems (see  section  "Display  Hardware  Settings"  ).  The
  1132. HF_Gray_16 global setting, as described in  section  "HF_Gray_16"  will  also
  1133. affect the type of data written to the output file.
  1134.  
  1135. 2.2.2.3.2        Output File Name
  1136.  
  1137.   Output_File_Name=file Sets output file to file
  1138.   +Ofile                Same as Output_File_Name=file
  1139.  
  1140.  
  1141. The default output filename is created from the scene name and  need  not  be
  1142. specified. The scene name is  the  input  name  with  all  drive,  path,  and
  1143. extension   stripped.    For    example    if    the    input    name    is
  1144. +Ic:\povray3\mystuff\myfile.pov  the  scene  name  is  myfile.  The   proper
  1145. extension is appended to the scene name based on the file type.  For  example
  1146. myfile.tga or myfile.png might be used.
  1147.  
  1148. You may override the default output name with  the  Output_File_Name=file  or
  1149. +Ofile option. For example:
  1150.  
  1151.   Input_File_Name=myinput.pov
  1152.   Output_File_Name=myoutput.tga
  1153.  
  1154.  
  1155. If an output file name of "-" is specified (a single minus  sign),  then  the
  1156. output will be written to the standard output, usually the screen. The output
  1157. can then be piped into another program or to a GUI if desired.
  1158.  
  1159. 2.2.2.3.3        Output File Buffer
  1160.  
  1161.   Buffer_Output=bool Turn output buffering on/off
  1162.   +B                 Turn output buffering on
  1163.   -B                 Turn output buffering off
  1164.   Buffer_Size=n      Set output buffer size to 'n' kilobytes. If n  is  zero,
  1165.                      no buffering. If n < system default, the system  default
  1166.                      is used.
  1167.   +Bn                Turn buffer on, set size n
  1168.   -Bn                Turn buffer off, but for future set size n
  1169.  
  1170.  
  1171. The Buffer_Output and Buffer_Size options and the +B  switch  allows  you  to
  1172. assign large buffers to the output file. This  reduces  the  amount  of  time
  1173. spent writing to the disk. If this parameter is not specified, then  as  each
  1174. row of pixels is finished, the line is written to the file and  the  file  is
  1175. flushed. On most systems, this operation ensures that the file is written  to
  1176. the disk so that in the event of a system crash or other catastrophic  event,
  1177. at least part of the picture has been  stored  properly  and  retrievable  on
  1178. disk. The default value is Buffer_Output=off.
  1179.  
  1180. 2.2.2.4          CPU Utilization Histogram
  1181.  
  1182. The CPU utilization histogram is a  way  of  finding  out  where  POV-Ray  is
  1183. spending its rendering time, as well as  an  interesting  way  of  generating
  1184. heightfields. The histogram splits up the screen into a rectangular  grid  of
  1185. blocks. As POV-Ray renders the image, it calculates the  amount  of  time  it
  1186. spends rendering each pixel, and then adds this time to the  total  rendering
  1187. time for each grid block. When the rendering is complete, the histogram is  a
  1188. file which represents how much time was spent computing the  pixels  in  each
  1189. grid block.
  1190.  
  1191. Note that not all versions of POV-Ray allow the creation  of  histograms.  As
  1192. well, the histogram output is dependent on the file  type,  as  well  as  the
  1193. system that POV-Ray is being run on.
  1194.  
  1195. 2.2.2.4.1        File Type
  1196.  
  1197.   Histogram_Type=x Set histogram type to x (turn off if type is 'X')
  1198.   +HTx             Same as Histogram_Type=x
  1199.  
  1200.  
  1201. The histogram output file type is nearly the same as that used for the  image
  1202. output file types in "Output File Type" . The available histogram file  types
  1203. are as follows:
  1204.  
  1205.   +HTC Comma separated values (CSV) often used in spreadsheets
  1206.   +HTN New PNG (portable network graphics) format grayscale
  1207.   +HTP Unix PPM format
  1208.   +HTS System-specific such as Mac Pict or Windows BMP
  1209.   +HTT Uncompressed Targa-24 format (TGA)
  1210.   +HTX No histogram file output is generated
  1211.  
  1212.  
  1213. Note that +HTC does not generate a compressed Targa-24  format  output  file,
  1214. but rather a text file with a comma-separated list of the time spent in  each
  1215. grid block, in left-to-right and top-to  bottom  order.  The  units  of  time
  1216. output to the  CSV  file  are  system  dependent.  See  the  system  specific
  1217. documentation for further details on the time units in CSV files.
  1218.  
  1219. The Targa and PPM format files are in the POV heightfield format (see "Height
  1220. Field" ), so the histogram information is stored in both the  red  and  green
  1221. parts of the image, which makes it unsuitable for viewing.  When  used  as  a
  1222. height field, lower values indicate less time spent calculating the pixels in
  1223. that block, while higher indicate more time spent in that block.
  1224.  
  1225. PNG format images are stored as grayscale images, and  are  useful  for  both
  1226. viewing the histogram data as well as for use as a heightfield. In PNG files,
  1227. the darker (lower) areas indicate less time spent in that grid  block,  while
  1228. the brighter (higher) areas indicate more time spent in that grid block.
  1229.  
  1230. 2.2.2.4.2        File Name
  1231.  
  1232.   Histogram_Name=file Set histogram name to file
  1233.   +HNfile             Same as Histogram_Name=file
  1234.  
  1235.  
  1236. The histogram file name is the name  of  the  file  in  which  to  write  the
  1237. histogram data. If the file  name  is  not  specified,  it  will  default  to
  1238. "histgram.ext", where ext is based on the  file  type  specified  previously.
  1239. Note that if the histogram name is specified, the file name extension  should
  1240. match the file type.
  1241.  
  1242. 2.2.2.4.3        Grid Size
  1243.  
  1244.   Histogram_Grid_Size=xx.yy Set histogram grid to xx by yy
  1245.   +HSxx.yy                  Same as Histogram_Grid_Size=xx.yy
  1246.  
  1247.  
  1248. The histogram grid size gives the number of times the image is  split  up  in
  1249. both the horizontal and vertical directions. For example:
  1250.  
  1251.   povray +Isample +W640 +H480 +HTN +HS160.120 +HNhistogrm.png
  1252.  
  1253.  
  1254. will split the image into 160x120 grid blocks, each of size 4x4  pixels,  and
  1255. output a PNG file, suitable for viewing or for use as a heightfield.  Smaller
  1256. numbers for the grid size mean more pixels are put into the same grid  block.
  1257. With CSV output, the number of values output is the same  as  the  number  of
  1258. grid blocks specified. For the other formats, the image size is identical  to
  1259. the rendered image, rather than  the  specified  grid  size,  to  allow  easy
  1260. comparison between the histogram and the rendered image..  If  the  histogram
  1261. grid size is not specified, it will default to the same size as the image, so
  1262. there will be one grid block per pixel.
  1263.  
  1264. Note that on systems that do task-switching or multi-tasking,  the  histogram
  1265. may not exactly represent the amount of time POV-Ray spent in  a  given  grid
  1266. block, since the histogram is based on real time rather than CPU time.  As  a
  1267. result, time may be spent for operating system overhead  or  on  other  tasks
  1268. running at the same time. This will cause the histogram  to  have  speckling,
  1269. noise or large spikes. This can be reduced by decreasing  the  grid  size  so
  1270. that more pixels are averaged into a given grid block.
  1271.  
  1272. 2.2.3            Scene Parsing Options
  1273.  
  1274. POV-Ray reads in your scene file and processes it to create an internal model
  1275. of your scene. The process is called parsing. As it parses your file, it  may
  1276. read other files along the way. This section covers options  concerning  what
  1277. to parse, where to find it, and what version specific assumptions  it  should
  1278. make while parsing it.
  1279.  
  1280. 2.2.3.1          Input File Name
  1281.  
  1282.   Input_File_Name=file Sets input file name to file
  1283.   +Ifile               Same as Input_File_Name=file
  1284.  
  1285.  
  1286. You will probably always set this option but if you do not, the default input
  1287. filename is object.pov. If you  do  not  have  an  extension,  then  .pov  is
  1288. assumed. On case-sensitive operating systems, both .pov and .POV are tried. A
  1289. full    path    specification    may     be     used.     For     example:
  1290. +Ic:\povray3\mystuff\myfile.pov. In addition to  specifying  the  input  file
  1291. name, this also establishes the scene name.
  1292.  
  1293. The scene name is  the  input  name  with  all  drive,  path,  and  extension
  1294. stripped. In this example, the scene name is myfile. This  name  is  used  to
  1295. create a default output file name and it is referenced other places.
  1296.  
  1297. If you use "-" as the input file name the input will be  read  from  standard
  1298. input. Using this you can pipe a scene created by a program to POV and render
  1299. it without having a scene file.
  1300.  
  1301. Under MS-DOS you can try this feature with
  1302.  
  1303.   type ANYSCENE.POV | povray -i-
  1304.  
  1305.  
  1306. 2.2.3.2          Library Paths
  1307.  
  1308.   Library_Path=path Add path to list of library paths
  1309.   +Lpath            Same as Library_Path=path
  1310.  
  1311.  
  1312. POV-Ray looks for files in the current directory. If it does not find a  file
  1313. it needs, it looks in various other library directories  which  you  specify.
  1314. POV-Ray does not search your operating system  path.  It  only  searches  the
  1315. current directory and directories which you specify  with  this  option.  For
  1316. example the standard include files are usually kept in one special directory.
  1317. You tell POV-Ray to look there with...
  1318.  
  1319.   Library_Path=c:\povray3\include
  1320.  
  1321.  
  1322. You must not specify any final path seperators (\ or /) at the end.
  1323.  
  1324. Multiple uses of this option switch do not override previous settings. Up  to
  1325. ten unique paths may be specified. If you specify the exact same path  twice,
  1326. it is only counts once. The current directory will be searched first followed
  1327. by the indicated library directories in the  order  in  which  you  specified
  1328. them.
  1329.  
  1330. 2.2.3.3          Language Version
  1331.  
  1332.   Version=n.n Set initial language compatibility to version n.n
  1333.   +MVn.n      Same as Version=n.n
  1334.  
  1335.  
  1336. While many language changes have been made for POV-Ray 3.0,  all  of  version
  1337. 2.0 syntax and most of version 1.0 syntax still works. Whenever  possible  we
  1338. try to maintain backwards compatibility. One feature introduced in  2.0  that
  1339. was  incompatible  with  any  1.0  scene  files  is  the  parsing  of  float
  1340. expressions. Setting +MV1.0 or Version=1.0 turns off  expression  parsing  as
  1341. well as many warning messages so that nearly all 1.0 files will  still  work.
  1342. The changes between 2.0 and 3.0 are not as extensive. Setting Version=2.0  is
  1343. only necessary to eliminate some  warning  messages.  Naturally  the  default
  1344. setting for this option is Version=3.0
  1345.  
  1346. The #version language directive also can be  used  to  change  modes  several
  1347. times within scene files. This option only affects the initial setting.
  1348.  
  1349. See  "Version  Directive"  for  more  details  about  the  language  version
  1350. directive.
  1351.  
  1352. 2.2.3.4          Removing User Bounding
  1353.  
  1354.   Remove_Bounds=bool Turn unnecessary bounds removal on/off
  1355.   +UR                Turn unnecessary bounds removal on
  1356.   -UR                Turn unnecessary bounds removal off
  1357.   Split_Unions=bool  Turn split bounded unions on/off
  1358.   +SU                Turn split bounded unions on
  1359.   -SU                Turn split bounded unions off
  1360.  
  1361.  
  1362. Early versions of POV-Ray had no system  of  automatic  bounding  or  spatial
  1363. sub-division to speed up ray-object intersection tests. Users had to manually
  1364. create bounding boxes to  speed  up  the  rendering.  POV-Ray  3.0  has  more
  1365. sophisticated automatic bounding than any previous version. In many cases the
  1366. manual bounding on older scenes is slower than  the  new  automatic  systems.
  1367. Therefore POV-Ray removes manual bounding when it knows it will help. In rare
  1368. instances you may want to keep manual bounding. Some older scenes incorrectly
  1369. used bounding when they should have used clipping. In these scenes if POV-Ray
  1370. removes the bounds, the image will not look right. To turn off the  automatic
  1371. removal of manual bounds, you should specify Remove_Bounds=off  or  -UR.  The
  1372. default is +UR.
  1373.  
  1374. One area where the jury is still out is the  splitting  of  manually  bounded
  1375. unions. Note unbounded unions are always split into their component parts  so
  1376. that automatic bounding works better. Most users do not bound unions  because
  1377. they know that doing so is usually slower. If you do manually bound  a  union
  1378. we presume you really want it bound. For safety sake we  do  not  presume  to
  1379. remove such bounds. If you want to remove  manual  bounds  from  unions,  you
  1380. should specify Split_Unions=on or +SU. The default is -SU.
  1381.  
  1382. 2.2.4            Shell-out to Operating System
  1383.  
  1384.   Pre_Scene_Command=s   Set command before entire scene
  1385.   Pre_Frame_Command=s   Set command before each frame
  1386.   Post_Scene_Command=s  Set command after entire scene
  1387.   Post_Frame_Command=s  Set command after each frame
  1388.   User_Abort_Command=s  Set command when user aborts POV-Ray
  1389.   Fatal_Error_Command=s Set command when POV-Ray has fatal error
  1390.  
  1391.  
  1392. Note no +/- switches are available for these options.  They  cannot  be  used
  1393. from the command line. They may only be used from INI files.
  1394.  
  1395. POV-Ray offers you the opportunity to shell-out to the  operating  system  at
  1396. several key points to execute another program or batch file. Usually this  is
  1397. used to manage files created by the internal animation loop however the shell
  1398. commands are available for any scene. The CMD is a single line of text  which
  1399. is passed to the operating system to execute a program. For example:
  1400.  
  1401.   Post_Scene_Command=tga2gif -d -m myfile
  1402.  
  1403.  
  1404. would use the utility tga2gif with  the  -d  and  -m  parameters  to  convert
  1405. myfile.tga to myfile.gif after the scene had finished rendering.
  1406.  
  1407. 2.2.4.1          String Substitution in Shell Commands
  1408.  
  1409. It could get cumbersome to  change  the  Post_Scene_Command  every  time  you
  1410. changed scene names. POV-Ray can substitute various values into a CMD  string
  1411. for you. For example:
  1412.  
  1413.   Post_Scene_Command=tga2gif -d -m %s
  1414.  
  1415.  
  1416. POV-Ray will substitute the %s with the scene name in the command. The  scene
  1417. name is the Input_File_Name or  +i  setting  with  any  drive,  directory  or
  1418. extension removed. For example:
  1419.  
  1420.   Input_File_Name=c:\povray3\scenes\waycool.pov
  1421.  
  1422.  
  1423. is stripped down to the scene name "waycool" which results in...
  1424.  
  1425.   Post_Scene_Command=tga2gif -d -m waycool
  1426.  
  1427.  
  1428. In an animation it may be necessary to have the exact output file  name  with
  1429. the frame number included. The string %o  will  substitute  the  output  file
  1430. name. Suppose you want to save your output  files  in  a  zip  archive  using
  1431. pkzip. You could do...
  1432.  
  1433.   Post_Frame_Command=pkzip -m %s %o
  1434.  
  1435.  
  1436. After rendering frame 12 of myscene.pov, POV-Ray would shell to the operating
  1437. system with pkzip -m myscene mysce012.tga.  The  -m  switch  in  pkzip  moves
  1438. mysce012.tga to myscene.zip and removes it from the directory. Note  that  %o
  1439. includes  frame  numbers  only  when  in  an  animation  loop.  During   the
  1440. Pre_Scene_Command and Post_Scene_Command, there is no  frame  number  so  the
  1441. original, unnumbered Output_File_Name  is  used.  Any  User_Abort_Command  or
  1442. Fatal_Error_Command not inside the loop will similarly give an unnumbered  %o
  1443. substitution.
  1444.  
  1445. Here is the complete list of substitutions available for a common string.
  1446.  
  1447.   %o Output file name with extension and embedded frame number if any
  1448.   %s Scene name derived by stripping path and ext from input name
  1449.   %n Frame number of this frame
  1450.   %k Clock value of this frame
  1451.   %h Height of image in pixels
  1452.   %w Width of image in pixels
  1453.   %% A single % sign.
  1454.  
  1455. 2.2.4.2          Shell Command Sequencing
  1456.  
  1457. Here is the sequence of events in an animation loop. Non-animated scenes work
  1458. the exact same way except there is no loop.
  1459.  
  1460.   1)  All INI and switches are processed just once.
  1461.   2)  Open any text output streams and do Create_INI if any
  1462.   3)  Pre_Scene_Command executed if any
  1463.   4)  Loop through frames (or just do once on non-animation)
  1464.       a)  Pre_Frame_Command executed if any
  1465.       b)  Parse entire scene file, open output file and read settings,
  1466.           turn on display, render the frame, destroy all objects,
  1467.           textures etc., close output file, close display.
  1468.       c)  Post_Frame_Command executed if any
  1469.       d)  Go back to 4 a until all frames done
  1470.   5)  Post_Scene_Command executed if any
  1471.   6)  Exit POV-Ray.
  1472.  
  1473.  
  1474. If the  user  interrupts  processing,  the  User_Abort_Command,  if  any,  is
  1475. executed. User aborts can only occur during the parsing and  rendering  parts
  1476. of step 4b above.
  1477.  
  1478. If a fatal error occurs that POV-Ray  notices,  the  Fatal_Error_Command,  if
  1479. any, is executed. Sometimes an unforeseen bug or memory error could  cause  a
  1480. total crash of the program in which case there is no  chance  to  shell  out.
  1481. Fatal errors can occur just about anywhere including during the processing of
  1482. switches or INI files. If a fatal error occurs before POV-Ray  has  read  the
  1483. Fatal_Error_Command string then obviously no shell can occur.
  1484.  
  1485. Note that the entire scene is re-parsed for every frame. Future  versions  of
  1486. POV-Ray may allow you to hold over parts of a scene from once  frame  to  the
  1487. next but for now, it starts from  scratch  ever  time.  Note  also  that  the
  1488. Pre_Frame_Command occurs before the scene is parsed. You might  use  this  to
  1489. call some custom scene generation utility before  each  frame.  This  utility
  1490. could rewrite your .POV or .INC files if needed. Perhaps  you  will  want  to
  1491. generate new .GIF or .TGA files for image  maps  or  height  fields  on  each
  1492. frame.
  1493.  
  1494. 2.2.4.3          Shell Command Return Actions
  1495.  
  1496.   Pre_Scene_Return=s   Set pre scene return actions
  1497.   Pre_Frame_Return=s   Set pre frame return actions
  1498.   Post_Scene_Return=s  Set post scene return actions
  1499.   Post_Frame_Return=s  Set post frame return actions
  1500.   User_Abort_Return=s  Set user abort return actions
  1501.   Fatal_Error_Return=s Set fatal return actions
  1502.  
  1503.  
  1504. Note no +/- switches are available for these options.  They  cannot  be  used
  1505. from the command line. They may only be used from INI files.
  1506.  
  1507. Most operating systems allow application programs to return an error code  if
  1508. something goes wrong. When POV-Ray executes a shell command, it can make  use
  1509. of this error code returned from the shell process and take some  appropriate
  1510. action if the code is zero or non-zero. POV-Ray itself returns such codes. It
  1511. returns 0 for success, 1 for fatal error and 2 for user abort.
  1512.  
  1513. The actions are designated by a single letter  in  the  different  *_Return=s
  1514. options. The possible actions are:
  1515.  
  1516.   I ignore the code
  1517.   S skip one step
  1518.   A all steps skipped
  1519.   Q quit POV-Ray immediately
  1520.   U generate a user abort in POV-Ray
  1521.   F generate a fatal error in POV-Ray
  1522.  
  1523.  
  1524. For example if your Pre_Frame_Command calls a program  which  generates  your
  1525. height field data and that utility fails, then  it  will  return  a  non-zero
  1526. code.  We  would  probably  want  POV-Ray  to  abort  as  well.  The  option
  1527. Pre_Frame_Return=F  will  cause  POV-Ray  to  do  a  fatal  abort   if   the
  1528. Pre_Frame_Command returns a non-zero code.
  1529.  
  1530. Sometimes a non-zero code from the external process is a good thing.  Suppose
  1531. you want to test if a frame has already been rendered. You could  use  the  S
  1532. action to skip this frame if the file is  already  rendered.  Most  utilities
  1533. report an error if the file is not found. For example the  command  pkzip  -v
  1534. myscene mysce012.tga tells pkzip you want to view its catalog for myscene.zip
  1535. for the file mysce012.tga. If the file isn't in the archive, pkzip returns  a
  1536. non-zero code.
  1537.  
  1538. However we want to skip if the file is found. Therefore we  need  to  reverse
  1539. the ACTION so it skips on zero and doesn't skip on non-zero. To  reverse  the
  1540. zero vs non-zero triggering of an action, precede it with a - sign. (Note a !
  1541. will also work. ! is used in many programming languages as a "not" operator).
  1542.  
  1543.  
  1544. Pre_Frame_Return=S will skip if the code  shows  error  (non-zero)  and  will
  1545. proceed normally on no error (zero).
  1546.  
  1547. Pre_Frame_Return=-S will skip if there is no error (zero)  and  will  proceed
  1548. normally if there is an error (non-zero).
  1549.  
  1550. The default for all shells is I which  means  ignore  the  return  action  no
  1551. matter what. POV-Ray simply proceeds with whatever it was  doing  before  the
  1552. shell command. The other actions depend upon the context.  You  may  want  to
  1553. refer back to the animation loop sequence chart in the previous section.  The
  1554. action for each shell is as follows...
  1555.  
  1556. On return from any User_Abort_Command, if there is an  action  triggered  and
  1557. you have specified...
  1558.  
  1559.   F             then turn  this  user  abort  into  a  fatal  error.  Do  the
  1560.                 Fatal_Error_Command, if any. Exit POV-Ray with error code  1.
  1561.  
  1562.   S, A, Q, or U then proceed with the user abort.  Exit  POV-Ray  with  error
  1563.                 code 2.
  1564.  
  1565.  
  1566. On return from any Fatal_Error_Command,  proceed  with  the  fatal  error  no
  1567. matter what. Exit POV-Ray with error code 1.
  1568.  
  1569. On return from any Pre_Scene_Command,  Pre_Frame_Command,  Post_Frame_Command
  1570. or  Post_Scene_Commands  if  there  is  an  action  triggered  and  you  have
  1571. specified...
  1572.  
  1573.   F then generate a fatal error. Do the  Fatal_Error_Command,  if  any.  Exit
  1574.     POV-Ray with an error code 1.
  1575.   U then generate a user abort.  Do  the  User_Abort_Command,  if  any.  Exit
  1576.     POV-Ray with an error code 2.
  1577.   Q then quit POV-Ray immediately. Acts as though POV-Ray never  really  ran.
  1578.     Do no further shells, (not even Post_Scene_Command) and exit POV-Ray with
  1579.     an error code 0.
  1580.  
  1581.  
  1582. On return from a Pre_Scene_Command, if there is an action triggered  and  you
  1583. haSethen skip rendering all frames. Acts as though the  scene  completed  all
  1584.     frames normally. Do not do any Pre_Frame_Command or  Post_Frame_Commands.
  1585.     Do the Post_Scene_Command, if any. Exit POV-Ray with error code 0. On the
  1586.     earlier chart this means skip step #4.
  1587.   A then skip all scene activity. Works exactly like Q quit. On  the  earlier
  1588.     chart this means skip to step #6.
  1589.  
  1590.  
  1591. On return from a Pre_Frame_Command, if there is an action triggered  and  you
  1592. have specified...
  1593.  
  1594.   S then skip only this frame. Acts as though this frame  never  existed.  Do
  1595.     not do the Post_Frame_Command.  Proceed  with  the  next  frame.  On  the
  1596.     earlier chart this means skip steps #4b and #4c but loop back  as  needed
  1597.     in #4d.
  1598.   A then skip rendering this frame and all remaining frames. Acts  as  though
  1599.      the  scene  completed  all  frames  normally.  Do  not  do  any  further
  1600.     Post_Frame_Commands. Do the Post_Scene_Command, if any. Exit POV-Ray with
  1601.     error code 0. On the earlier chart this means skip the rest  of  step  #4
  1602.     and proceed at step #5.
  1603.  
  1604.  
  1605. On return from a Post_Frame_Command, if there is an action triggered and  you
  1606. have specified...
  1607.  
  1608.   S then skip rendering all  remaining  frames.  Acts  as  though  the  scene
  1609.     completed all frames normally. Do the Post_Scene_Command,  if  any.  Exit
  1610.     POV-Ray with error code 0. On the earlier chart this means skip the  rest
  1611.     of step #4 and proceed at step #5.
  1612.   A same as S for this shell command.
  1613.  
  1614.  
  1615. On return from any Post_Scene_Command, if there is an  action  triggered  and
  1616. you have specified...
  1617.  
  1618.  
  1619. 2.2.5            Text Output
  1620.  
  1621. Text output is an important way that POV-Ray keeps you informed about what it
  1622. is going to do, what it is doing and what it did. New  to  POV-Ray  3.0,  the
  1623. program splits its text messages into 7 separate streams.  Some  versions  of
  1624. POV-Ray color codes the various types of text. Some  versions  allow  you  to
  1625. scroll back several pages of messages. All versions allow you to turn some of
  1626. these text streams off/on or to direct a copy of the text output  to  one  or
  1627. several files. This section details the options which give you  control  over
  1628. text output.
  1629.  
  1630. 2.2.5.1          Text Streams
  1631.  
  1632. There are seven distinct text streams that POV-Ray uses for output.  On  some
  1633. versions each stream is designated by a particular  color.  Text  from  these
  1634. streams are displayed whenever  it  is  appropriate  so  there  is  often  an
  1635. intermixing of the text. The distinction is only important if you  choose  to
  1636. turn some of the streams off or to direct some of the streams to text  files.
  1637. On some systems you may be able to review the streams separately in their own
  1638. scroll-back buffer.
  1639.  
  1640. Here is a description of each stream.
  1641.  
  1642. BANNER:  This  stream  displays  the  program's  sign-on  banner,  copyright,
  1643. contributor's list, and some  help  screens.  It  cannot  be  turned  off  or
  1644. directed to a file because most of this text is displayed before any  options
  1645. or switches are read. Therefore you cannot use an option or switch to control
  1646. it. There are switches which display the help screens. They  are  covered  in
  1647. section "Help Screen Switches" .
  1648.  
  1649. DEBUG: This stream displays debugging messages. It was primarily designed for
  1650. developers but this and other streams may also be used by the user to display
  1651. messages from within their  scene  files.  See  "Text  Message  Streams"  for
  1652. details on this feature. This stream may be turned off and/or directed  to  a
  1653. text file.
  1654.  
  1655. FATAL: This stream displays fatal error messages. After displaying this text,
  1656. POV-Ray will terminate. When the error is a scene parsing error, you  may  be
  1657. shown several lines of scene text that leads up to the error. This stream may
  1658. be turned off and/or directed to a text file.
  1659.  
  1660. RENDER:  This  stream  displays  information  about  what  options  you  have
  1661. specified to render the scene. It includes  feedback  on  all  of  the  major
  1662. options such as scene name, resolution, animation settings, anti-aliasing and
  1663. others. This stream may be turned off and/or directed to a text file.
  1664.  
  1665. STATISTICS: This stream displays statistics after a  frame  is  rendered.  It
  1666. includes information about the number of rays traced, the length of  time  of
  1667. the processing and other information. This stream may be  turned  off  and/or
  1668. directed to a text file.
  1669.  
  1670. STATUS: This stream displays  one-line  status  messages  that  explain  what
  1671. POV-Ray is doing at the moment. On some systems this stream is displayed on a
  1672. status line at the bottom of the screen. This stream cannot be directed to  a
  1673. file because there is generally no need to. The text displayed by the Verbose
  1674. option or +V switch is output to this stream  so  that  part  of  the  status
  1675. stream may be turned off.
  1676.  
  1677. WARNING: This stream displays warning messages during the  parsing  of  scene
  1678. files and other warnings. Despite the warning, POV-Ray can continue to render
  1679. the scene. You will be informed if POV-Ray has  made  any  assumptions  about
  1680. your scene so that it can proceed. In general any time you see a warning, you
  1681. should also assume that this means that future versions of POV-Ray  will  not
  1682. allow the warned action. Therefore you should attempt  to  eliminate  warning
  1683. messages so your scene will be able to run in  future  versions  of  POV-Ray.
  1684. This stream may be turned off and/or directed to a text file.
  1685.  
  1686. 2.2.5.2          Console Text Output
  1687.  
  1688.   Debug_Console=bool     Turn console display of debug info text on/off
  1689.   +GD                    Same as Debug_Console=On
  1690.   -GD                    Same as Debug_Console=Off
  1691.   Fatal_Console=bool     Turn console display of fatal error text on/off
  1692.   +GF                    Same as Fatal_Console=On
  1693.   -GF                    Same as Fatal_Console=Off
  1694.   Render_Console=bool    Turn console display of render info text on/off
  1695.   +GR                    Same as Render_Console=On
  1696.   -GR                    Same as Render_Console=Off
  1697.   Statistic_Console=bool Turn console display of statistic text on/off
  1698.   +GS                    Same as Statistic_Console=On
  1699.   -GS                    Same as Statistic_Console=Off
  1700.   Warning_Console=bool   Turn console display of warning text on/off
  1701.   +GW                    Same as Warning_Console=On
  1702.   -GW                    Same as Warning_Console=Off
  1703.   All_Console=bool       Turn on/off all debug, fatal, render, statistic  and
  1704.                          warning text to console.
  1705.   +GA                    Same as All_Console=On
  1706.   -GA                    Same as All_Console=Off
  1707.  
  1708.  
  1709. You may suppress the output to the  console  of  the  Debug,  Fatal,  Render,
  1710. Statistic or Warning text  streams.  For  example  the  Statistic_Console=off
  1711. option or the -GS switch can turn off the Statistic stream. Using on  or  +GS
  1712. you may turn it on again. You may also turn all 5 of these streams on or  off
  1713. at once using the All_Console option or +GA switch.
  1714.  
  1715. Note these options take effect  immediately  when  specified.  Obviously  any
  1716. Error or Warning messages that might occur before the option is read, it will
  1717. not be affected.
  1718.  
  1719. 2.2.5.3          Directing Text Streams to Files
  1720.  
  1721.   Debug_File=true      Echo debug info text to DEBUG.OUT
  1722.   Debug_File=false     Turn off file output of debug info
  1723.   Debug_File=file      Echo debug info text to file
  1724.   +GDfile              Both Debug_Console=On, Debug_File=file
  1725.   -GDfile              Both Debug_Console=Off, Debug_File=file
  1726.   Fatal_File=true      Echo fatal text to FATAL.OUT
  1727.   Fatal_File=false     Turn off file output of fatal
  1728.   Fatal_File=file      Echo fatal info text to file
  1729.   +GFfile              Both Fatal_Console=On, Fatal_File=file
  1730.   -GFfile              Both Fatal_Console=Off, Fatal_File=file
  1731.   Render_File=true     Echo render info text to RENDER.OUT
  1732.   Render_File=false    Turn off file output of render info
  1733.   Render_File=file     Echo render info text to file
  1734.   +GRfile              Both Render_Console=On, Render_File=file
  1735.   -GRfile              Both Render_Console=Off, Render_File=file
  1736.   Statistic_File=true  Echo statistic text to STATS.OUT
  1737.   Statistic_File=false Turn off file output of statistics
  1738.   Statistic_File=file  Echo statistic text to file
  1739.   +GSFile              Both Statistic_Console=On, Statistic_File=file
  1740.   -GSFile              Both Statistic_Console=Off, Statistic_File=file
  1741.   Warning_File=true    Echo warning info text to WARNING.OUT
  1742.   Warning_File=false   Turn off file output of warning info
  1743.   Warning_File=file    Echo warning info text to file
  1744.   +GWfile              Both Warning_Console=On, Warning_File=file
  1745.   -GWfile              Both Warning_Console=Off, Warning_File=file
  1746.   All_File=true        Echo all debug, fatal, render, statistic  and  warning
  1747.                        text to ALLTEXT.OUT
  1748.   All_File=false       Turn off file output  of  all  debug,  fatal,  render,
  1749.                        statistic and warning text
  1750.   All_File=file        Echo all debug, fatal, render, statistic  and  warning
  1751.                        text to file
  1752.   +GAfile              Both All_Console=On, All_File=file
  1753.   -GAfile              Both All_Console=Off, All_File=file
  1754.  
  1755.  
  1756. You may direct a copy of the text streams to  a  text  file  for  the  Debug,
  1757. Fatal,  Render,  Statistic  or  Warning  text  streams.  For   example   the
  1758. Statistic_File=ssssss option or the +GSsssssss switch. If the  string  ssssss
  1759. is true or any of the other valid true strings then that stream is redirected
  1760. to a file with a default name. Valid "true" values are true, yes, on or 1. If
  1761. the value is false, the direction to a text file is turned off. Valid "false"
  1762. values are false, no, off or 0. Any other  string  specified  turns  on  file
  1763. output and the string is interpreted as the output file name.
  1764.  
  1765. Similarly you may specify such a true, false or  file  name  string  after  a
  1766. switch such as +GSfile. You may also direct all 5 of  these  streams  to  the
  1767. same file using the All_File option or +GA switch. You may  not  specify  the
  1768. same file for two or more streams because POV-Ray will fail when it tries  to
  1769. open or close the same file twice.
  1770.  
  1771. Note these options take effect  immediately  when  specified.  Obviously  any
  1772. Error or Warning messages that might occur before the option is read, it will
  1773. not be affected.
  1774.  
  1775. 2.2.5.4          Help Screen Switches
  1776.  
  1777.   +H or +?   Show help screen 0 if this is the only switch
  1778.   +H0 to +H8 Show help screen 0 to 8 if this is the only switch
  1779.   +?0 to +?8 Same as +H0 to +H8
  1780.  
  1781.  
  1782. Note there are no INI style equivalents to these options.
  1783.  
  1784. Graphical interface versions of POV-Ray such as Mac or Windows have extensive
  1785. online help. Other versions of POV-Ray have only a few  quick-reference  help
  1786. screens. The +? switch, optionally followed by a single digit from  0  to  8,
  1787. will display these help screens to the Banner text stream.  After  displaying
  1788. the help screens, POV-Ray terminates. Because some operating systems  do  not
  1789. permit a question mark as a command line switch, you  may  also  use  the  +H
  1790. switch. Note however that this switch is also used to specify the  height  of
  1791. the image in pixels. Therefore the +H switch is only interpreted  as  a  help
  1792. switch if it is the only switch on the command line and if  the  value  after
  1793. the switch is less than or equal to 8.
  1794.  
  1795. 2.2.6            Tracing Options
  1796.  
  1797. There is more than one way to trace a ray. Sometimes  there  is  a  trade-off
  1798. between quality and speed. Sometimes options designed to make tracing  faster
  1799. can slow things down. This section covers options that tell  POV-Ray  how  to
  1800. trace rays with the appropriate speed and quality settings.
  1801.  
  1802. 2.2.6.1          Quality Settings
  1803.  
  1804.   Quality=n Set quality value to n (0 <= n <= 10)
  1805.   +Qn       Same as Quality=n
  1806.  
  1807.  
  1808. The Quality=nn option  or  +Qnn  switch  allows  you  to  specify  the  image
  1809. rendering quality. You may choose to lower the quality for test rendering and
  1810. raise it for final renders. The quality adjustments are made  by  eliminating
  1811. some of the calculations that are normally performed.  For  example  settings
  1812. below 4 do not render shadows. Settings below 8  do  not  use  reflection  or
  1813. refraction. The values correspond to the following quality levels:
  1814.  
  1815.   0,1 Just show quick colors. Use full ambient lighting  only.  Quick  colors
  1816.       are used only at 5 or below.
  1817.   2,3 Show specified diffuse and ambient light.
  1818.   4   Render shadows, but no extended lights.  5  Render  shadows,  including
  1819.       extended lights.
  1820.   6,7 Compute texture patterns.
  1821.   8   Compute reflected, refracted, and transmitted rays.
  1822.   9   Compute halos.
  1823.   10  Use radiosity, but do not calculate halos.
  1824.   11  Use radiosity and halos.
  1825.  
  1826.  
  1827. The default is 9 if not specified. A value of 10 or 11  turns  on  radiosity.
  1828. Radiosity   is   an   additional   calculation   which   computes   diffuse
  1829. inter-reflection. It is  an  extremely  slow  calculation  that  is  somewhat
  1830. experimental. The parameters which control  how  radiosity  calculations  are
  1831. performed are specified in the global_settings {radiosity {...} }  statement.
  1832. See "Miscellaneous Features" for further details.
  1833.  
  1834. 2.2.6.2          Automatic Bounding Control
  1835.  
  1836.   Bounding=bool        Turn bounding on/off
  1837.   +MB                  Turn bounding on; threshold 25 or prev. amt
  1838.   -MB                  Turn bounding off
  1839.   Bounding_Threshold=n Set bound threshold to n
  1840.   +MBn                 Turn bounding on; bound threshold to n
  1841.   -MBn                 Turn bounding off; for future threshold to n
  1842.   Light_Buffer=bool    Turn light buffer on/off
  1843.   +UL                  Turn light buffer on
  1844.   -UL                  Turn light buffer off
  1845.   Vista_Buffer=bool    Turn vista buffer on/off
  1846.   +UV                  Turn vista buffer on
  1847.   -UV                  Turn vista buffer off
  1848.  
  1849.  
  1850. POV-Ray uses a variety of spatial sub-division systems to speed up ray-object
  1851. intersection tests. The primary system uses a hierarchy  of  nested  bounding
  1852. boxes. This system compartmentalizes all  finite  objects  in  a  scene  into
  1853. invisible rectangular boxes that  are  arranged  in  a  tree-like  hierarchy.
  1854. Before testing the objects within the bounding boxes the  tree  is  descended
  1855. and only those objects are tested whose bounds are hit by  a  ray.  This  can
  1856. greatly improve rendering speed. However for scenes with only a  few  objects
  1857. the overhead of using  a  bounding  system  is  not  worth  the  effort.  The
  1858. Bounding=off option or -MB switch allows  you  to  force  bounding  off.  The
  1859. default value is on.
  1860.  
  1861. The Bounding_Threshold=nnn or +MBnnn switch allows you  to  set  the  minimum
  1862. number of objects necessary before bounding is used.  The  default  is  +MB25
  1863. which means that if your scene  has  fewer  than  25  objects,  POV-Ray  will
  1864. automatically turn bounding off because the overhead isn't worth it.
  1865.  
  1866. Additionally POV-Ray uses systems known as vista buffers and light buffers to
  1867. further speed things up. These systems only work when bounding is on and when
  1868. there are a sufficient number of objects to meet the bounding threshold.  The
  1869. vista buffer is created by projecting the bounding  box  hierarchy  onto  the
  1870. screen and determining the rectangular areas that are covered by each of  the
  1871. elements in the hierarchy. Only those  objects  whose  rectangles  enclose  a
  1872. given pixel are tested by the primary viewing ray. The vista buffer can  only
  1873. be used with perspective and orthographic cameras  because  they  rely  on  a
  1874. fixed viewpoint and a "reasonable" projection (i.e. lines have to stay  lines
  1875. after the projection).
  1876.  
  1877. The light buffer is created by enclosing each light source  in  an  imaginary
  1878. box and projecting the bounding box hierarchy onto each  of  its  six  sides.
  1879. Since this relies on a fixed light source, light buffers will not be used for
  1880. area lights.
  1881.  
  1882. Reflected and transmitted rays do not take advantage of the light  and  vista
  1883. buffer.
  1884.  
  1885. The default settings are Vista_Buffer=on or +UV and Light_Buffer=on  or  +UL.
  1886. The option to turn these features  off  is  available  to  demonstrate  their
  1887. usefulness and as protection against unforeseen bugs which might exist in any
  1888. of these bounding systems.
  1889.  
  1890. In general, any finite object and many types of CSG of  finite  objects  will
  1891. properly respond to this bounding system. In addition blobs and meshes use an
  1892. additional internal bounding system. These systems are not  affected  by  the
  1893. above switch. They can be switched off using the appropriate  syntax  in  the
  1894. scene file (see "Blob" and "Mesh" for details). Text objects are  split  into
  1895. individual letters that are bound using the bounding box hierarchy. Some  CSG
  1896. combinations of finite and infinite objects are also automatically bound. The
  1897. end result is that you will rarely need to add manual bounding objects as was
  1898. necessary in earlier  versions  of  POV-Ray  unless  you  use  many  infinite
  1899. objects.
  1900.  
  1901. 2.2.6.3          Anti-Aliasing Options
  1902.  
  1903.   Antialias=bool          Turns anti-aliasing on/off
  1904.   +A                      Turns aa on with threshold 0.3 or previous amount
  1905.   -A                      Turns anti-aliasing off
  1906.   Sampling_Method=n       Sets aa-sampling method (1 or 2)
  1907.   +AMn                    Same as Sampling_Method=n
  1908.   Antialias_Threshold=n.n Sets anti-aliasing threshold
  1909.   +An.n                   Sets aa on with aa-threshold at n.n
  1910.   -An.n                   Sets aa off (aa-threshold n.n in future)
  1911.   Jitter=bool             Sets aa-jitter on/off
  1912.   +J                      Sets aa-jitter on with 1.0 or previous amount
  1913.   -J                      Sets aa-jitter off
  1914.   Jitter_Amount=n.n       Sets aa-jitter amount to n.n. If n.n <= 0 aa-jitter
  1915.                           is set off
  1916.   +Jn.n                   Sets aa-jitter on; jitter amount to n.n. If n.n  <=
  1917.                           0 aa-jitter is set off
  1918.   -Jn.n                   Sets aa-jitter off (jitter amount n.n in future)
  1919.   Antialias_Depth=n       Sets aa-depth (1 <= n <= 9)
  1920.   +Rn                     Same as Antialias_Depth=n
  1921.  
  1922.  
  1923. The ray tracing process is in effect a  discrete,  digital  sampling  of  the
  1924. image with typically one sample per pixel.  Such  sampling  can  introduce  a
  1925. variety of errors. This includes a jagged, stair-step appearance  in  sloping
  1926. or curved lines, a broken look for thin lines, moire patterns of interference
  1927. and lost detail or missing objects which are so  small  they  reside  between
  1928. adjacent pixels. The effect that is responsible for those  errors  is  called
  1929. aliasing.
  1930.  
  1931. Anti-aliasing is any technique used to  help  eliminate  such  errors  or  to
  1932. reduce the negative impact they have on the image. In general,  anti-aliasing
  1933. makes the ray traced image look "smoother". The  Antialias=on  option  or  +A
  1934. switch turns on POV-Ray's anti-aliasing system.
  1935.  
  1936. When anti-aliasing is turned on, POV-Ray attempts to "smooth" the  errors  by
  1937. shooting more than one viewing ray into each pixel and averaging the  results
  1938. to  determine  the  pixel's  apparent  color.  This  technique   is   called
  1939. super-sampling and can improve the appearance  of  the  final  image  but  it
  1940. drastically increases the time required to render a  scene  since  many  more
  1941. calculations have to be done.
  1942.  
  1943. POV-Ray gives you the option to  use  one  of  two  alternate  super-sampling
  1944. methods. The Sampling_Method=n option or  +AMn  switch  selects  non-adaptive
  1945. super-sampling (method 1) or adaptive super-sampling (method 2).
  1946.  
  1947. In the default, non-adaptive method (+am1), POV-Ray initially traces one  ray
  1948. per pixel. If the color of a pixel differs from its neighbor (to the left  or
  1949. above) by more than a threshold value, then the  pixel  is  super-sampled  by
  1950. shooting a given, fixed number of additional rays. The default  threshold  is
  1951. 0.3 but it may be changed using the Antialias_Threshold=n.n option. When  the
  1952. switches are used, the threshold may optionally follow the  +A.  For  example
  1953. +A0.1 turns anti-aliasing on and sets the threshold to 0.1.
  1954.  
  1955. The threshold comparison is computed as follows. If r1, g1, b1 and r2, g2, b2
  1956. are the rgb components of two pixels then the difference  between  pixels  is
  1957. computed by:
  1958.  
  1959.   diff = abs(r1-r2) + abs(g1-g2) + abs(b1-b2)
  1960.  
  1961.  
  1962. If  this  difference  is  greater  than  the  threshold  both   pixels   are
  1963. super-sampled. The rgb values are in the range 0.0 to 1.0 thus the  most  two
  1964. pixels can differ is 3.0. If the anti-aliasing threshold is 0.0,  then  every
  1965. pixel is super-sampled. If the threshold is 3.0,  then  no  anti-aliasing  is
  1966. done. Lower threshold means  more  anti-aliasing  and  also  more  time.  Use
  1967. anti-aliasing for your final version of a picture, not the rough  draft.  The
  1968. lower the contrast, the  lower  the  threshold  should  be.  Higher  contrast
  1969. pictures can get away with higher tolerance values. Good values  seem  to  be
  1970. around 0.2 to 0.4.
  1971.  
  1972. When using the non-adaptive method, the default number of super-samples is  9
  1973. per pixel, located on a 3x3 grid). The Antialias_Depth=n option or +Rn switch
  1974. controls the number of rows and columns of samples taken for a  super-sampled
  1975. pixel. For example +R4 would give 4x4=16 samples per pixel.
  1976.  
  1977. The second, adaptive super-sampling method starts by tracing four rays at the
  1978. corners of each pixel. If the resulting colors differ more than the threshold
  1979. amount additional samples are taken. This is done recursively, i.e. the pixel
  1980. is divided into four sub-pixels that are separately  traced  and  tested  for
  1981. further subdivision. The advantage of this method is the  reduced  number  of
  1982. rays that have to be traced. Samples that are common  among  adjacent  pixels
  1983. and sub-pixels are stored  and  reused  to  avoid  re-tracing  of  rays.  The
  1984. recursive character of this method makes it adaptive, i.e. the super-sampling
  1985. concentrates on those parts of  the  pixel  that  are  more  likely  to  need
  1986. super-sampling.
  1987.  
  1988. The maximum number of subdivisions  is  specified  by  the  Antialias_Depth=n
  1989. option or +Rn switch. This is different from the non-adaptive method were the
  1990. total  number  of  super-samples  is  specified.  A  maximum  number  of   n
  1991. subdivisions results in a maximum number of samples per pixel that  is  given
  1992. by the following table.
  1993.  
  1994.       Number of samples per    Maximum number of samples
  1995.       super-sampled pixel for  per super-sampled pixel for
  1996.  +Rn  the non-adaptive method  the adaptive method
  1997.   1                1                       9
  1998.   2                4                      25
  1999.   3                9                      81
  2000.   4               16                     289
  2001.   5               25                    1089
  2002.   6               36                    4225
  2003.   7               49                   16641
  2004.   8               64                   66049
  2005.   9               81                  263169
  2006.  
  2007.  
  2008. You should note that the maximum number of samples is hardly ever reached for
  2009. a given pixel because of the adaptive sampling. If  the  adaptive  method  is
  2010. used with no anti-aliasing each pixel will be the average of the rays  traced
  2011. at its corners. In most cases it does not make sense to use a recursion level
  2012. greater than 3.
  2013.  
  2014. Another way to reduce aliasing artifacts  is  to  introduce  noise  into  the
  2015. sampling process. This is called "jittering"  and  works  because  the  human
  2016. visual system is much more forgiving to noise than it is to regular patterns.
  2017. The location of the super-samples is jittered or wiggled a tiny  amount  when
  2018. anti-aliasing is used. Jittering is used by default but it may be turned  off
  2019. with the Jitter=off option or -J switch. The amount of jittering can  be  set
  2020. with the Jitter_Scale=n.nn option. When using switches the jitter  scale  may
  2021. be specified after the +J switch. For example  +J0.5  uses  half  the  normal
  2022. jitter. The default amount of 1.0 is the maximum  jitter  which  will  insure
  2023. that all super-samples remain  inside  the  original  pixel.  Note  that  the
  2024. jittering "noise" is random and non-repeatable  so  you  should  avoid  using
  2025. jitter in animation sequences, as  the  anti-aliased  pixels  will  vary  and
  2026. flicker annoyingly from frame to frame.
  2027.  
  2028. If
  2029. anti-aliasing is not used one sample per pixel is  taken  regardless  of  the
  2030. super-sampling method specified.
  2031.  
  2032. 3                Scene Description Language
  2033.  
  2034. The Scene Description Language allows you to describe the world in a readable
  2035. and convenient way. Files are created in plain ASCII text using an editor  of
  2036. your choice. The input file  name  is  specified  using  the  Input_File=file
  2037. option or +Ifile switch. By  default  the  files  have  the  extension  .POV.
  2038. POV-Ray reads the file, processes it by creating an  internal  model  of  the
  2039. scene and then renders the scene.
  2040.  
  2041. The overall syntax of a scene is a file  that  contains  any  number  of  the
  2042. following items in any order.
  2043.  
  2044.    LANGUAGE_DIRECTIVES
  2045.    camera{ CAMERA_ITEMS }
  2046.    OBJECT_STATEMENTS
  2047.    ATMOSPHERE_STATEMENTS
  2048.    global_settings { GLOBAL_ITEMS }
  2049.  
  2050.  
  2051. See "Language Directives" , "Objects" , "Camera" ,  "Atmospheric  Effects"  ,
  2052. and "Global Settings" for details.
  2053.  
  2054. 3.1              Language Basics
  2055.  
  2056. The POV-Ray language consists of  identifiers,  reserved  keywords,  floating
  2057. point expressions, strings, special symbols  and  comments.  The  text  of  a
  2058. POV-Ray scene file is free format. You may put statements on  separate  lines
  2059. or on the same line as you  desire.  You  may  add  blank  lines,  spaces  or
  2060. indentations as long as you do not split any keywords or identifiers.
  2061.  
  2062. 3.1.1            Identifiers and Keywords
  2063.  
  2064. POV-Ray allows you to define identifiers for later use in the scene file.  An
  2065. identifier may be 1 to 40 characters long. It may consist of upper  or  lower
  2066. case letters, the digits 0 through 9 or an underscore  character.  The  first
  2067. character must be an alphabetic character. The declaration of identifiers  is
  2068. covered later.
  2069.  
  2070. POV-Ray has a number of reserved keywords which are listed below.
  2071.  
  2072.  
  2073. aa_level                 fog_alt              range
  2074. aa_threshold             fog_offset           reciprocal
  2075. abs                      fog_type             recursion_limit
  2076. acos                     frequency            red
  2077. acosh                    gif                  reflection
  2078. adaptive                 global_settings      refraction
  2079. adc_bailout              glowing              render
  2080. agate                    gradient             repeat
  2081. agate_turb               granite              rgb
  2082. all                      gray_threshold       rgbf
  2083. alpha                    green                rgbft
  2084. ambient                  halo                 rgbt
  2085. ambient_light            height_field         right
  2086. angle                    hexagon              ripples
  2087. aperture                 hf_gray_16           rotate
  2088. arc_angle                hierarchy            roughness
  2089. area_light               hollow               samples
  2090. asc                      hypercomplex         scale
  2091. asin                     if                   scallop_wave
  2092. asinh                    ifdef                scattering
  2093. assumed_gamma            iff                  shadowless
  2094. atan                     image_map            sin
  2095. atan2                    incidence            sine_wave
  2096. atanh                    include              sinh
  2097. atmosphere               int                  sky
  2098. atmospheric_attenuation  interpolate          sky_sphere
  2099. attenuating              intersection         slice
  2100. average                  inverse              slope_map
  2101. background               ior                  smooth
  2102. bicubic_patch            irid                 smooth_triangle
  2103. black_hole               irid_wavelength      sor
  2104. blob                     jitter               specular
  2105. blue                     julia_fractal        sphere
  2106. blur_samples             lambda               spherical_mapping
  2107. bounded_by               lathe                spiral
  2108. box                      leopard              spiral1
  2109. box_mapping              light_source         spiral2
  2110. bozo                     linear               spotlight
  2111. break                    linear_spline        spotted
  2112. brick                    linear_sweep         sqr
  2113. brick_size               location             sqrt
  2114. brightness               log                  statistics
  2115. brilliance               looks_like           str
  2116. bumps                    look_at              strcmp
  2117. bumpy1                   low_error_factor     strength
  2118. bumpy2                   mandel               strlen
  2119. bumpy3                   map_type             strlwr
  2120. bump_map                 marble               strupr
  2121. bump_size                material_map         sturm
  2122. camera                   matrix               substr
  2123. case                     max                  superellipsoid
  2124. caustics                 max_intersections    switch
  2125. ceil                     max_iteration        sys
  2126. checker                  max_trace_level      t
  2127. chr                      max_value            tan
  2128. clipped_by               merge                tanh
  2129. clock                    mesh                 test_camera_1
  2130. color                    metallic             test_camera_2
  2131. color_map                min                  test_camera_3
  2132. colour                   minimum_reuse        test_camera_4
  2133. colour_map               mod                  text
  2134. component                mortar               texture
  2135. composite                nearest_count        texture_map
  2136. concat                   no                   tga
  2137. cone                     normal               thickness
  2138. confidence               normal_map           threshold
  2139. conic_sweep              no_shadow            tightness
  2140. constant                 number_of_waves      tile2
  2141. control0                 object               tiles
  2142. control1                 octaves              torus
  2143. cos                      off                  track
  2144. cosh                     offset               transform
  2145. count                    omega                translate
  2146. crackle                  omnimax              transmit
  2147. crand                    on                   triangle
  2148. cube                     once                 triangle_wave
  2149. cubic                    onion                true
  2150. cubic_spline             open                 ttf
  2151. cylinder                 orthographic         turbulence
  2152. cylindrical_mapping      panoramic            turb_depth
  2153. debug                    pattern1             type
  2154. declare                  pattern2             u
  2155. default                  pattern3             ultra_wide_angle
  2156. degrees                  perspective          union
  2157. dents                    pgm                  up
  2158. difference               phase                use_color
  2159. diffuse                  phong                use_colour
  2160. direction                phong_size           use_index
  2161. disc                     pi                   u_steps
  2162. distance                 pigment              v
  2163. distance_maximum         pigment_map          val
  2164. div                      planar_mapping       variance
  2165. dust                     plane                vaxis_rotate
  2166. dust_type                png                  vcross
  2167. eccentricity             point_at             vdot
  2168. else                     poly                 version
  2169. emitting                 polygon              vlength
  2170. end                      pot                  vnormalize
  2171. error                    pow                  volume_object
  2172. error_bound              ppm                  volume_rendered
  2173. exp                      precision            vol_with_light
  2174. exponent                 prism                vrotate
  2175. fade_distance            pwr                  v_steps
  2176. fade_power               quadratic_spline     warning
  2177. falloff                  quadric              warp
  2178. falloff_angle            quartic              water_level
  2179. false                    quaternion           waves
  2180. file_exists              quick_color          while
  2181. filter                   quick_colour         width
  2182. finish                   quilted              wood
  2183. fisheye                  radial               wrinkles
  2184. flatness                 radians              x
  2185. flip                     radiosity            y
  2186. floor                    radius               yes
  2187. focal_point              rainbow              z
  2188. fog                      ramp_wave
  2189.  
  2190.  
  2191.  
  2192.  
  2193. All reserved words are fully lower case. Therefore  it  is  recommended  that
  2194. your identifiers contain at least one upper case character so it is  sure  to
  2195. avoid conflict with reserved words.
  2196.  
  2197. The following keywords are in the above list of reserved keywords but are not
  2198. currently used by POV-Ray however they remain reserved.
  2199.  
  2200.   bumpy1               test_camera_1
  2201.   bumpy2               test_camera_2
  2202.   bumpy3               test_camera_3
  2203.   incidence            test_camera_4
  2204.   pattern1             track
  2205.   pattern2             volume_object
  2206.   pattern3             volume_rendered
  2207.   spiral               vol_with_light
  2208.  
  2209.  
  2210. 3.1.2            Comments
  2211.  
  2212. Comments are text in the scene file included to make the scene file easier to
  2213. read or understand. They are ignored by the ray tracer and are there for your
  2214. information. There are two types of comments in POV-Ray.
  2215.  
  2216. Two slashes are used for single line comments. Anything on  a  line  after  a
  2217. double slash // is ignored by the ray tracer. For example:
  2218.  
  2219.   // This line is ignored
  2220.  
  2221.  
  2222. You can have scene file information on the line in front of the  comment,  as
  2223. in:
  2224.  
  2225.   object { FooBar }  // this is an object
  2226.  
  2227.  
  2228. The other type of comment is used for multiple lines. This It starts with  /*
  2229. and ends with */. Everything in-between is ignored. For example:
  2230.  
  2231.   /* These lines
  2232.      Are ignored
  2233.      By the
  2234.      Ray-tracer */
  2235.  
  2236.  
  2237. This can be useful if you want to temporarily remove elements  from  a  scene
  2238. file. /*...*/ comments can "comment out" lines containing other //  comments,
  2239. and thus can be used to temporarily or permanently comment  out  parts  of  a
  2240. scene. /*..*/ comments can be nested, the following is legal:
  2241.  
  2242.   /* This is a comment
  2243.   // This too
  2244.   /* This also */
  2245.   */
  2246.  
  2247.  
  2248. Use comments liberally and generously. Well used,  they  really  improve  the
  2249. readability of scene files.
  2250.  
  2251. 3.1.3            Float Expressions
  2252.  
  2253. Many parts of the POV-Ray  language  require  you  to  specify  one  or  more
  2254. floating point numbers. A floating point number is a number  with  a  decimal
  2255. point. Floats may be specified using literals, identifiers or functions which
  2256. return float values. You may also create very complex float expressions  from
  2257. combinations of any of these using various familiar operators.
  2258.  
  2259. Where POV-Ray needs an integer value it allows you to specify a  float  value
  2260. and it truncates it to an integer. When POV-Ray needs a  logical  or  boolean
  2261. value it interprets any non-zero float as true and  zero  as  false.  Because
  2262. float comparisons are subject to  rounding  errors,  POV-Ray  accepts  values
  2263. extremely close  to  zero  as  being  false  when  doing  boolean  functions.
  2264. Typically values whose absolute values are less than a preset  value  EPSILON
  2265. are considered false for logical expressions. The value of EPSILON is  system
  2266. dependent but is generally about 1.0e-10. When comparing two floats A  and  B
  2267. for equality, if abs(A-B)<EPSILON then (A=B) is considered true.
  2268.  
  2269. 3.1.3.1          Float Literals
  2270.  
  2271. Float literals are represented by an  optional  sign  (-),  some  digits,  an
  2272. optional decimal point, and more digits. If the number is an integer you  may
  2273. omit the decimal point and trailing zero. If it is  all  fractional  you  may
  2274. omit the leading zero. POV-Ray supports scientific notation for very large or
  2275. very small numbers. The following are all valid float literals:
  2276.  
  2277.   -2.0    -4    34    3.4e6    2e-5    .3    0.6
  2278.  
  2279.  
  2280. 3.1.3.2          Float Identifiers
  2281.  
  2282. Float identifiers may be declared to make scene files more  readable  and  to
  2283. parameterize scenes so  that  changing  a  single  declaration  changes  many
  2284. values. An identifier is declared as follows...
  2285.  
  2286.   #declare IDENTIFIER = EXPRESSION
  2287.  
  2288.  
  2289. Where IDENTIFIER is the name of the identifier up to 40 characters  long  and
  2290. EXPRESSION is any valid expression which evaluates to a float value. Here are
  2291. some examples...
  2292.  
  2293.   #declare Count = 0
  2294.   #declare Rows = 5
  2295.   #declare Cols = 6
  2296.   #declare Number = Rows*Cols
  2297.   #declare Count = Count+1
  2298.  
  2299.  
  2300. As the last example shows, you can re-declare a float identifier and may  use
  2301. previously declared values in that re-declaration. There are several built-in
  2302. identifiers which POV-Ray declares for you. See  "Built-in  Identifiers"  for
  2303. details.
  2304.  
  2305. 3.1.3.3          Float Operators
  2306.  
  2307. Arithmetic float expressions can be created from float literals,  identifiers
  2308. or functions using the following operators in this order of precedence...
  2309.  
  2310.   ()             expressions in parentheses first
  2311.   +A   -A   !A   unary minus, unary plus and logical "not"
  2312.   A*B  A/B       multiplication and division
  2313.   A+B  A-B       addition and subtraction
  2314.  
  2315.  
  2316. Relational, logical, and conditional expressions may also be created. However
  2317. there is a restriction that these types of expressions must  be  enclosed  in
  2318. parentheses first. This restriction, which is not imposed  by  most  computer
  2319. languages, is necessary because POV-Ray allows mixing  of  float  and  vector
  2320. expressions.  Without  the  parentheses  there  is  an  ambiguity   problem.
  2321. Parentheses are not required for the unary logical not operator "!" as  shown
  2322. above. The operators and their precedence are shown here.
  2323.  
  2324. Relational: Operands are arithmetic expressions.  Result  is  always  boolean
  2325. with 1 for true,  0  for  false.  All  relational  operators  have  the  same
  2326. precedence.
  2327.  
  2328.   (A < B)  A is less than B
  2329.   (A <= B) A is less than or equal to B
  2330.   (A = B)  A is equal to B (actually abs(A-B)<EPSILON)
  2331.   (A != B) A is not equal to B (actually abs(A-B)>=EPSILON)
  2332.   (A >= B) A is greater than or equal to B
  2333.   (A > B)  A is greater than B
  2334.  
  2335.  
  2336. Logical: Operands are converted to boolean values of 0 for false  and  1  for
  2337. true.  Result  is  always  boolean.  All  logical  operators  have  the  same
  2338. precedence. Note these are not bitwise, they are logical.
  2339.  
  2340.   (A & B) true only if both A and B are true, false otherwise
  2341.   (A | B) true if either A or B or both are true
  2342.  
  2343.  
  2344. Conditional: Operand C is boolean. A and B are  any  expressions.  Result  is
  2345. always whatever A or B are.
  2346.  
  2347.   (C ? A : B) if C then A else B
  2348.  
  2349.  
  2350. Assuming the various  identifiers  have  been  declared,  the  following  are
  2351. examples of valid expressions...
  2352.  
  2353.   1+2+3       2*5         1/3         Row*3       Col*5
  2354.   (Offset-5)/2            This/That+Other*Thing
  2355.   ((This<That) & (Other>=Thing)?Foo:Bar)
  2356.  
  2357.  
  2358. Expressions are evaluated left to right with innermost parentheses  evaluated
  2359. first, then unary +, - or !, then multiply or divide, then add  or  subtract,
  2360. then relational, then logical, then conditional.
  2361.  
  2362. 3.1.4            Vector Expressions
  2363.  
  2364. POV-Ray often requires you to specify a vector. A vector is a set of  related
  2365. float values.  Vectors  may  be  specified  using  literals,  identifiers  or
  2366. functions which return vector values. You may also create very complex vector
  2367. expressions  from  combinations  of  any  of  these  using  various  familiar
  2368. operators.
  2369.  
  2370. POV-Ray vectors may have from two to five components but the vast majority of
  2371. vectors have three components. Unless specified otherwise, you should  assume
  2372. that the word "vector" means a three component vector. POV-Ray operates in  a
  2373. 3D x,y,z coordinate system and  you  will  use  three  component  vectors  to
  2374. specify x, y and z values. In some places POV-Ray needs only two coordinates.
  2375. These are often specified by a 2D vector called a UV vector. Fractal  objects
  2376. use a 4D vector. Color expressions use 5D vectors but allow you to specify 3,
  2377. 4 or 5 components and use default  values  for  the  unspecified  components.
  2378. Unless otherwise noted, all 2, 4 or 5 component vectors  work  just  like  3D
  2379. vectors but they have a different number of components.
  2380.  
  2381. 3.1.4.1          Vector Literals
  2382.  
  2383. Vectors consist of from two to five float expressions that are  bracketed  by
  2384. angle brackets < and >. The terms are separated by commas. For  example  here
  2385. is a typical three component vector:
  2386.  
  2387.   < 1.0, 3.2, -5.4578 >
  2388.  
  2389.  
  2390. The commas between components are necessary to keep the program from thinking
  2391. that the 2nd term is a single float expression "3.2-5.4578" and that there is
  2392. no 3rd term. If you see an error message such as Float expected but '>' found
  2393. instead it probably means two  floats  were  combined  because  a  comma  was
  2394. missing.
  2395.  
  2396. Sometimes POV-Ray requires you to specify floats  and  vectors  side-by-side.
  2397. The rules for vector expressions allow for mixing of vectors with vectors  or
  2398. vectors with floats so commas are required separators whenever  an  ambiguity
  2399. might arise. For example <1,2,3> -4 evaluates as a  mixed  float  and  vector
  2400. expression where 4 is subtracted from each component resulting in  <-3,-2,-1>
  2401. however the comma here <1,2,3>,-4 means this is a vector followed by a float.
  2402.  
  2403.  
  2404. Each   component   may   be   a   full   float   expression.   For   example
  2405. <This+3,That/3,5*Other_Thing> is a valid vector.
  2406.  
  2407. 3.1.4.2          Vector Identifiers
  2408.  
  2409. Vector identifiers may be declared to make scene files more readable  and  to
  2410. parameterize scenes so  that  changing  a  single  declaration  changes  many
  2411. values. An identifier is declared as follows...
  2412.  
  2413.   #declare IDENTIFIER = EXPRESSION
  2414.  
  2415.  
  2416. Where IDENTIFIER is the name of the identifier up to 40 characters  long  and
  2417. EXPRESSION is any valid expression which evaluates to a  vector  value.  Here
  2418. are some examples...
  2419.  
  2420.   #declare Here = <1,2,3>
  2421.   #declare There = <3,4,5>
  2422.   #declare Jump = <Foo*2,Bar-1,Bob/3>
  2423.   #declare Route = There-Here
  2424.   #declare Jump = Jump+<1,2,3>
  2425.  
  2426.  
  2427. Note that you invoke a vector identifier by using its name without any  angle
  2428. brackets. As the last example shows, you can re-declare a  vector  identifier
  2429. and may use previously declared values  in  that  re-declaration.  There  are
  2430. several built-in identifiers which POV-Ray declares for  you.  See  "Built-in
  2431. Identifiers" for details.
  2432.  
  2433. 3.1.4.3          Vector Operators
  2434.  
  2435. Vector  literals,  identifiers  and  functions  may  also  be  combined   in
  2436. expressions  the  same  as  float  values.  Operations  are  performed  on  a
  2437. component-by-component basis. For example <1,2,3>+<4,5,6> evaluates the  same
  2438. as  <1+5,2+5,6+9>  or  <5,7,9>.  Other  operations  are  done  on  a  similar
  2439. component-by-component basis. For example (<1,2,3> =  <3,2,1>)  evaluates  to
  2440. <0,1,0> because the middle components are  equal  but  the  others  are  not.
  2441. Admittedly this isn't very  useful  but  its  consistent  with  other  vector
  2442. operations.
  2443.  
  2444. Conditional expressions such as (C?A:B) require that C is a float  expression
  2445. but A and B may  be  vector  expressions.  The  result  is  that  the  entire
  2446. conditional evaluates as a valid vector. For  example  if  Foo  and  Bar  are
  2447. floats then ( Foo < Bar ? <1,2,3> : <5,6,7>) evaluates as the vector  <1,2,3>
  2448. if Foo is less than Bar and evaluates as <5,6,7> otherwise.
  2449.  
  2450. You may use the dot operator to extract a single  component  from  a  vector.
  2451. Suppose the identifier "Spot" was previously defined as a vector. Then Spot.x
  2452. is a float value that is the first component of this x,y,z vector.  Similarly
  2453. Spot.y and Spot.z reference the 2nd and 3rd components. If  Spot  was  a  two
  2454. component uv_vector you could use Spot.u and Spot.v to extract the first  and
  2455. second component. For a 4D vector use .x .y .z and .t to extract  each  float
  2456. component. The dot operator is also  used  in  color  expressions  which  are
  2457. covered later.
  2458.  
  2459. 3.1.4.4          Operator Promotion
  2460.  
  2461. You may use a lone float expression to define a vector whose  components  are
  2462. all the same. POV-Ray knows when it needs a vector of a particular  type  and
  2463. will promote a float into a vector if need be. For example the POV-Ray  scale
  2464. statement requires a three component vector. If  you  specify  scale  5  then
  2465. POV-Ray interprets this as scale <5,5,5> which means you want to scale  by  5
  2466. in every direction.
  2467.  
  2468. Versions of POV-Ray prior to 3.0 only allowed such use of a float as a vector
  2469. in various limited places such as scale and turbulence. However you  may  now
  2470. use this trick anywhere. For example...
  2471.  
  2472.   box{0,1}    // This is the same as box{<0,0,0>,<1,1,1>}
  2473.   sphere{0,1} // This is the same as sphere{<0,0,0>,1}
  2474.  
  2475.  
  2476. This automatic promotion is especially useful because it lets you mix  floats
  2477. and vectors in the same  expression.  For  example  in  3*<1,2,3>  the  3  is
  2478. promoted to <3,3,3> thus the expression is <3,3,3>*<1,2,3> which evaluates as
  2479. <3,6,9>.
  2480.  
  2481. When promoting a float into a  vector  of  2,  3,  4  or  5  components,  all
  2482. components are set to the float value, however when promoting a vector  of  a
  2483. lower number  of  components  into  a  higher  order  vector,  all  remaining
  2484. components are set to zero. For example if POV-Ray expects a  4D  vector  and
  2485. you specify 9 the result is <9,9,9,9> but if you specify <7,6> the result  is
  2486. <7,6,0,0>.
  2487.  
  2488. 3.1.5            Specifying Colors
  2489.  
  2490. POV-Ray often requires you to specify a color. Colors consist of five  values
  2491. or color components. The first three are called red,  green  and  blue.  They
  2492. specify the intensity of the primary colors, red, green  and  blue  using  an
  2493. additive color system like the one used by the  red,  green  and  blue  color
  2494. phosphors on a color monitor.
  2495.  
  2496. The  4th  component,  called  filter,  specifies  the  amount  of   filtered
  2497. transparency  of  a  substance.  Some  real-world   examples   of   filtered
  2498. transparency are stained  glass  windows  or  tinted  cellophane.  The  light
  2499. passing through such objects is  tinted  by  the  appropriate  color  as  the
  2500. material selectively absorbs some frequencies of light while allowing  others
  2501. to pass through. The color of the object is subtracted from the light passing
  2502. through so this is called subtractive transparency.
  2503.  
  2504. The 5th component, called transmit,  specifies  the  amount  of  non-filtered
  2505. light that is transmitted through a  surface.  Some  real-world  examples  of
  2506. non-filtered transparency are thin see-through cloth, fine mesh  netting  and
  2507. dust on a surface. In these examples, all frequencies of light are allowed to
  2508. pass through tiny holes in the surface. Although the amount of light  passing
  2509. through is diminished, the color of the light passing through  is  unchanged.
  2510. The color of the object is added to the light  passing  through  so  this  is
  2511. called additive transparency.
  2512.  
  2513. Note: Early versions of POV-Ray used the keyword alpha  to  specify  filtered
  2514. transparency  however  that  word  is  often  used  to  descrbe  non-filtered
  2515. transparency. For this reason, alpha is no longer used.
  2516.  
  2517. Each of the five components of a color are float values which are normally in
  2518. the range between 0.0 and 1.0 however any values, even negatives may be used.
  2519.  
  2520.  
  2521. Colors may be specified using vectors, keywords with floats, or  identifiers.
  2522. You may also create very complex color expressions from combinations  any  of
  2523. these using various familiar operators. The syntax for specifying a color has
  2524. evolved since POV-Ray was first released. We  have  maintained  the  original
  2525. keyword-based syntax and added a short-cut vector notation. Either the old or
  2526. new syntax is acceptable however the vector syntax  is  easier  to  use  when
  2527. creating color expressions.
  2528.  
  2529. 3.1.5.1          Color Vectors
  2530.  
  2531. The syntax for a color vector is any of the following...
  2532.  
  2533.   color rgb VECTOR3
  2534.   color rgbf VECTOR4
  2535.   color rgbt VECTOR4
  2536.   color rgbft VECTOR5
  2537.  
  2538.  
  2539. where VECTOR3, VECTOR4 or VECTOR5 are any valid vector expressions of 3, 4 or
  2540. 5 components. For example
  2541.  
  2542.   color rgb <1.0, 0.5, 0.2>
  2543.  
  2544.  
  2545. This specifies a color whose red component is 1.0 or 100% of full  intensity;
  2546. the green component is 0.5 or 50% of full intensity and the blue component is
  2547. 0.2 or 20% of full intensity. Although the filter and transmit components are
  2548. not explicitly specified, they exist and are set to their default values of 0
  2549. or no transparency.
  2550.  
  2551. The rgbf keyword requires a four component vector. The 4th component  is  the
  2552. filter component and the transmit component defaults to zero.  Similarly  the
  2553. rgbt keyword requires four components where the 4th value is moved to the 5th
  2554. component which is transmit and then the filter component is set to zero.
  2555.  
  2556. The rgbft keyword allows you to specify all five  components.  Internally  in
  2557. expressions all five are always used.
  2558.  
  2559. Under most circumstances the keyword color is optional and may be omitted. We
  2560. also  support  the  British  or  Canadian  spelling   colour.   Under   some
  2561. circumstances, if the vector expression is a 5 component expression or  there
  2562. is a color identifier in the expression then the rgbtf keyword is optional.
  2563.  
  2564. 3.1.5.2          Color Keywords
  2565.  
  2566. The older keyword method of specifying a color is still useful and many users
  2567. prefer it. Like a color vector, you begin with the  optional  keyword  color.
  2568. This is followed by any of five additional keywords red, green, blue, filter,
  2569. or transmit. Each  of  these  component  keywords  is  followed  by  a  float
  2570. expression. For example
  2571.  
  2572.   color red 1.0  green 0.5
  2573.  
  2574.  
  2575. This specifies a color whose red component is 1.0 or 100% of  full  intensity
  2576. and the green component is 0.5 or 50% of full intensity. Although  the  blue,
  2577. filter and transmit components are not explicitly specified, they  exist  and
  2578. are set to their default values of 0. The component keywords may be given  in
  2579. any order and if any component is unspecified its value defaults to zero.
  2580.  
  2581. 3.1.5.3          Color Identifiers
  2582.  
  2583. Color identifiers may be declared to make scene files more  readable  and  to
  2584. parameterize scenes so  that  changing  a  single  declaration  changes  many
  2585. values. A color identifier is declared as either of the following...
  2586.  
  2587.   #declare IDENTIFIER = COLOR_VECTOR
  2588.   #declare IDENTIFIER = COLOR_KEYWORDS...
  2589.  
  2590.  
  2591. Where IDENTIFIER is the name of the identifier up to 40 characters  long  and
  2592. COLOR_VECTOR  or  COLOR_KEYWORDS  are  any  valid  color  specifications  as
  2593. described in the two previous  sections  of  this  document.  Here  are  some
  2594. examples...
  2595.  
  2596.   #declare White = rgb <1,1,1>
  2597.   #declare Cyan = color blue 1.0  green 1.0
  2598.   #declare Weird = rgb <Foo*2,Bar-1,Bob/3>
  2599.   #declare LightGray = White*0.8
  2600.   #declare LightCyan = Cyan red 0.6
  2601.  
  2602.  
  2603. As the LightGray example shows, you do  not  need  any  color  keywords  when
  2604. creating color expressions based on  previously  declared  colors.  The  last
  2605. example shows you may use a color identifier with the keyword  style  syntax.
  2606. WARNING: Make sure  the  identifier  is  first  before  any  other  component
  2607. keywords.
  2608.  
  2609. Like floats and vectors, you may re-define colors throughout a scene but  the
  2610. need to do so is rare.
  2611.  
  2612. 3.1.5.4          Color Operators
  2613.  
  2614. Color vectors may be combined in expressions the  same  as  float  or  vector
  2615. values. Operations are  performed  on  a  component-by-component  basis.  For
  2616. example rgb <1.0, 0.5 0.2> * 0.9 evaluates the same as rgb <1.0, 0.5  0.2>  *
  2617. <0.9, 0.9, 0.9> or rgb <0.9, 0.45, 0.18>. Other  operations  are  done  on  a
  2618. similar component-by-component basis.
  2619.  
  2620. You may use the dot operator to extract a  single  component  from  a  color.
  2621. Suppose the identifier "Shade"  was  previously  defined  as  a  color.  Then
  2622. Shade.red is the float  value  of  the  red  component  of  Shade.  Similarly
  2623. Shade.green Shade.blue Shade.filter  and  Shade.transmit  extract  the  float
  2624. value of the other color components.
  2625.  
  2626. 3.1.5.5          Common Color Pitfalls
  2627.  
  2628. The variety and complexity of color specification methods can  lead  to  some
  2629. common mistakes. Here are some things to consider when specifying a color.
  2630.  
  2631. When using filter transparency, the colors which come through are  multiplied
  2632. by  the  primary  color  components.  For  example  if  grey  light  such  as
  2633. rgb<0.9,0.9,0.9> passes through a filter such  as  rgbf<1.0,0.5,0.0,1.0>  the
  2634. result is rgb<0.9,0.45,0.0> with the red let through 100%, the green  cut  in
  2635. half from 0.9 to 0.45 and the blue totally blocked.  Often  users  mistakenly
  2636. specify a clear object by
  2637.  
  2638.   color filter 1.0
  2639.  
  2640.  
  2641. but this has implied  red,  green  and  blue  values  of  zero.  You've  just
  2642. specified a totally black filter so no light passes through. The correct  way
  2643. is either:
  2644.  
  2645.   color red 1.0   green 1.0   blue 1.0   filter 1.0
  2646.  
  2647.  
  2648. or:
  2649.  
  2650.   color transmit 1.0
  2651.  
  2652.  
  2653. In the 2nd example it doesn't matter what the rgb  values  are.  All  of  the
  2654. light passes through untouched.
  2655.  
  2656. Another pitfall is the use of color identifiers and  expressions  with  color
  2657. keywords. For example...
  2658.  
  2659.   color My_Color red 0.5
  2660.  
  2661.  
  2662. this substitutes whatever was the  red  component  of  My_Color  with  a  red
  2663. component of 0.5 however...
  2664.  
  2665.   color My_Color + red 0.5
  2666.  
  2667.  
  2668. adds 0.5 to the red component of My_Color and even less obvious...
  2669.  
  2670.   color My_Color * red 0.5
  2671.  
  2672.  
  2673. this cuts the red  component  in  half  as  you  would  expect  but  it  also
  2674. multiplies the green, blue, filter and transmit components by zero! The  part
  2675. of the expression after the multiply operator evaluates to rgbft<0.5,0,0,0,0>
  2676. as a full 5 component color.
  2677.  
  2678. The following example results in no change to My_Color.
  2679.  
  2680.   color red 0.5 My_Color
  2681.  
  2682.  
  2683. that is because the identifier fully  overwrites  the  previous  value.  When
  2684. using identifiers with color keywords, the identifier should be first.
  2685.  
  2686. One final issue, some POV-Ray syntax allows  full  color  specifications  but
  2687. only uses the rgb part. In these cases it is legal to use  a  float  where  a
  2688. color is needed. For example:
  2689.  
  2690.   finish{ambient 1}
  2691.  
  2692.  
  2693. The ambient keyword expects a color so the value 1 is promoted to <1,1,1,1,1>
  2694. which is no problem. However
  2695.  
  2696.   pigment{color 0.4}
  2697.  
  2698.  
  2699. is legal but it may or may not be what you intended. The 0.4 is  promoted  to
  2700. <0.4,0.4,0.4,0.4,0.4> with the filter and transmit set to 0.4 as well. It  is
  2701. more likely you wanted...
  2702.  
  2703.   pigment{color rgb 0.4}
  2704.  
  2705.  
  2706. in which case a 3 component vector is expected. Therefore the 0.4 is promoted
  2707. to <0.4,0.4,0.4,0.0,0.0> with default zero for filter and transmit.
  2708.  
  2709. 3.1.6            Strings
  2710.  
  2711. The POV-Ray language requires you to specify a string  of  characters  to  be
  2712. used as a file name, text for messages or text for a text object. Strings may
  2713. be specified using literals, identifiers or  functions  which  return  string
  2714. values. Although you cannot build string expressions from symbolic  operators
  2715. such as are used with floats, vectors, or colors,  you  may  perform  various
  2716. string operations using string functions. Some  applications  of  strings  in
  2717. POV-Ray allow for non-printing  formatting  characters  such  as  newline  or
  2718. form-feed.
  2719.  
  2720. 3.1.6.1          String Literals
  2721.  
  2722. String literals begin with a double quote mark " which is followed by  up  to
  2723. 256 printable ASCII characters and are terminated  by  another  double  quote
  2724. mark. The following are all valid string literals:
  2725.  
  2726.   "Here"   "There"    "myfile.gif"    "textures.inc"
  2727.  
  2728.  
  2729. 3.1.6.2          String Identifiers
  2730.  
  2731. String identifiers may be declared to make scene files more readable  and  to
  2732. parameterize scenes so  that  changing  a  single  declaration  changes  many
  2733. values. An identifier is declared as follows...
  2734.  
  2735.   #declare IDENTIFIER = STRING
  2736.  
  2737.  
  2738. Where IDENTIFIER is the name of the identifier up to 40 characters  long  and
  2739. STRING is a string literal, string identifier or  function  which  returns  a
  2740. string value. Here are some examples...
  2741.  
  2742.   #declare Font_Name = "ariel.ttf"
  2743.   #declare Inc_File = "myfile.inc"
  2744.   #declare Name = "John"
  2745.   #declare Name = concat(Name," Doe")
  2746.  
  2747.  
  2748. As the last example shows, you can re-declare a string identifier and may use
  2749. previously declared values in that re-declaration.
  2750.  
  2751. 3.1.7            Built-in Identifiers
  2752.  
  2753. There are several built-in float and vector identifiers. You can use them  to
  2754. specify values or to create expressions but you  cannot  re-declare  them  to
  2755. change their values.
  2756.  
  2757. 3.1.7.1          Constant Built-in Identifiers
  2758.  
  2759. Most built-in identifiers never change value. They are defined as though  the
  2760. following lines were at the start of every scene.
  2761.  
  2762.   #declare pi = 3.1415926535897932384626
  2763.   #declare true = 1
  2764.   #declare yes = 1
  2765.   #declare on = 1
  2766.   #declare false = 0
  2767.   #declare no = 0
  2768.   #declare off = 0
  2769.   #declare u = <1,0>
  2770.   #declare v = <0,1>
  2771.   #declare x = <1,0,0>
  2772.   #declare y = <0,1,0>
  2773.   #declare z = <0,0,1>
  2774.   #declare t = <0,0,0,1>
  2775.  
  2776.  
  2777. The built-in float identifier pi is  obviously  useful  in  math  expressions
  2778. involving circles.
  2779.  
  2780. The built-in float identifiers on off yes no true false are designed for  use
  2781. as boolean constants.
  2782.  
  2783. The built-in vector identifiers x y and z provide  much  greater  readability
  2784. for your scene files when used in vector expressions. For example....
  2785.  
  2786.   plane {y,1}        // The normal vector is obviously "y".
  2787.   plane {<0,1,0>,1}  // This is harder to read.
  2788.  
  2789.   translate 5*x      // Move 5 units in the "x" direction.
  2790.   translate <5,0,0>  // This is less obvious.
  2791.  
  2792.  
  2793. An expression like 5*x evaluates to 5*<1,0,0> or <5,0,0>.
  2794.  
  2795. Similarly u and v may be used in 2D vectors. When using 4D vectors you should
  2796. use x y z and t and POV-Ray will promote x y and z to 4D when used  where  4D
  2797. is required.
  2798.  
  2799. 3.1.7.2          Built-in Identifier 'clock'
  2800.  
  2801. A built-in float identifier clock is used to control animations  in  POV-Ray.
  2802. Unlike some animation packages, the action in POV-Ray animated scenes do  not
  2803. depend upon the integer frame numbers. Rather you should design  your  scenes
  2804. based upon the float identifier clock. For non-animated  scenes  its  default
  2805. value is 0 but you can set it to any float value using the  INI  file  option
  2806. Clock=nn.nnn or the command-line switch +Knn.nnn to pass a single float value
  2807. your scene file.
  2808.  
  2809. Other INI options and switches may be used to animate scenes by automatically
  2810. looping through the rendering of frames using various values  for  clock.  By
  2811. default, the clock value is 0 for the initial  frame  and  1  for  the  final
  2812. frame. All other frames are interpolated between these values. For example if
  2813. your object is supposed to rotate one  full  turn  over  the  course  of  the
  2814. animation, you could specify rotate 360*clock*y Then as clock runs from 0  to
  2815. 1, the object rotates about the y-axis from 0 to 360 degrees.
  2816.  
  2817. Although the value of clock will change from frame-to-frame,  it  will  never
  2818. change throughout the parsing of a scene.
  2819.  
  2820.  
  2821. 3.1.7.3          Built-in Identifier 'version'
  2822.  
  2823. The built-in float identifier version contains the  current  setting  of  the
  2824. version compatibility option. Although this value defaults to 3 which is  the
  2825. current POV-Ray version number, the initial value of version may  be  set  by
  2826. the INI file option Version=n.nn or by the +MVn.nn command-line switch.  This
  2827. tells POV-Ray to parse the scene file using syntax from an earlier version of
  2828. POV-Ray.
  2829.  
  2830. The INI option or switch only  affects  the  initial  setting.  Unlike  other
  2831. built-in identifiers, you may change the value of version throughout a  scene
  2832. file. You do not use #declare to change it. The #version  language  directive
  2833. is used to change modes. Such changes may occur several  times  within  scene
  2834. files.
  2835.  
  2836. Together with the built-in version identifier, the #version directive  allows
  2837. you to save and restore the previous values of  this  compatibility  setting.
  2838. For example suppose MYSTUFF.INC is in version 1 format. At  the  top  of  the
  2839. file you could put:
  2840.  
  2841.   #declare Temp_Vers = version    // Save previous value
  2842.   #version 1.0                    // Change to 1.0 mode
  2843.  
  2844.   ... // Version 1.0 stuff goes here...
  2845.  
  2846.   #version Temp_Vers              // Restore previous version
  2847.  
  2848.  
  2849. 3.1.8            Functions
  2850.  
  2851. POV-Ray defines a variety of  built-in  functions  for  manipulating  floats,
  2852. vectors and strings. The functions are  listed  grouped  according  to  their
  2853. usage and not by the type of value they return. For example vdot computes the
  2854. dot product of two vectors and is listed as a vector function even though  it
  2855. returns a single float value.
  2856.  
  2857. Function calls consist of a keyword which specifies the name of the  function
  2858. followed  by  a  parameter  list  enclosed  in  parentheses.  Parameters  are
  2859. separated by commas. For example:
  2860.  
  2861. keyword(param1,param2)
  2862.  
  2863.  
  2864. Functions evaluate to values that are floats, vectors or strings and  may  be
  2865. used in expressions or statements anywhere that literals  or  identifiers  of
  2866. that type may be used.
  2867.  
  2868. 3.1.8.1          Float Functions
  2869.  
  2870. The following are the functions which take one or more float  parameters  and
  2871. return float values. Assume that A  and  B  are  any  valid  expression  that
  2872. evaluates to a float. See "Vector Functions" and "String Functions" for other
  2873. functions which return float values but whose primary purpose is more closely
  2874. related to vectors and strings.
  2875.  
  2876. abs(A): Absolute value of A. If A is negative, returns -A  otherwise  returns
  2877. A.
  2878.  
  2879. acos(A): Arc-cosine of A. Returns  the  angle,  measured  in  radians,  whose
  2880. cosine is A.
  2881.  
  2882. asin(A): Arc-sine of A. Returns the angle, measured in radians, whose sine is
  2883. A.
  2884.  
  2885. atan2(A,B): Arc-tangent of (A/B). Returns the  angle,  measured  in  radians,
  2886. whose tangent is (A/B). Returns appropriate value even  if  B  is  zero.  Use
  2887. atan2(A,1) to compute usual atan(A) function.
  2888.  
  2889. ceil(A): Ceiling of A. Returns the smallest integer greater than A. Rounds up
  2890. to the next higher integer.
  2891.  
  2892. cos(A): Cosine of A. Returns the cosine of the angle A, where A  is  measured
  2893. in radians.
  2894.  
  2895. degrees(A): Convert radians to degrees. Returns the angle measured in degrees
  2896. whose value in radians is A. Formula is degrees=A/pi*180.0.
  2897.  
  2898. div(A,B): Integer division. The integer part of (A/B).
  2899.  
  2900. exp(A): Exponential of A. Returns the value of e raised to the A power  where
  2901. e is the non-repeating value approximately equal to 2.71828182846 the base of
  2902. natural logarithms.
  2903.  
  2904. floor(A): Floor of A. Returns the largest integer less than A. Rounds down to
  2905. the next lower integer.
  2906.  
  2907. int(A): Integer part of A. Returns the truncated integer part  of  A.  Rounds
  2908. towards zero.
  2909.  
  2910. log(A): Natural logarithm of A. Returns the natural logarithm base e  of  the
  2911. value  A  where  e  is  the  non-repeating  value  approximately  equal   to
  2912. 2.71828182846.
  2913.  
  2914. max(A,B): Maximum of A and B. Returns A if A larger than B. Otherwise returns
  2915. B.
  2916.  
  2917. min(A,B): Minimum of A and B. Returns  A  if  A  smaller  than  B.  Otherwise
  2918. returns B.
  2919.  
  2920. mod(A,B): Value of A modulo  A.  Returns  the  remainder  after  the  integer
  2921. division of A/B. Formula is mod=((A/B)-int(A/B))*B.
  2922.  
  2923. pow(A,B): Exponentiation. Returns the value of A raised to the power B.
  2924.  
  2925. radians(A): Convert degrees to radians. Returns the angle measured in radians
  2926. whose value in degrees is A. Formula is radians=A*pi/180.0.
  2927.  
  2928. sin(A): Sine of A. Returns the sine of the angle A, where A  is  measured  in
  2929. radians.
  2930.  
  2931. sqrt(A): Square root of A. Returns the value whose square is A.
  2932.  
  2933. tan(A): Tangent of A. Returns the tangent of the angle A, where A is measured
  2934. in radians.
  2935.  
  2936. 3.1.8.2          Vector Functions
  2937.  
  2938. The following are the functions which take  one  or  more  vector  and  float
  2939. parameters and return vector or float values. All of these functions  support
  2940. only three component vectors. Assume that V1 and V2 are any valid  expression
  2941. that evaluates to a three component vector and that A is any valid expression
  2942. that evaluates to a float.
  2943.  
  2944. vaxis_rotate(V1,V2,A): Rotate V1 about V2 by A. Given the  x,y,z  coordinates
  2945. of a point in space designated by the vector V1, rotate that point  about  an
  2946. arbitrary axis defined by the vector V2. Rotate it through an angle specified
  2947. in degrees by the float value A. The result is a vector  containing  the  new
  2948. x,y,z coordinates of the point.
  2949.  
  2950. vcross(V1,V2): Cross product of V1 and V2.  Returns  a  vector  that  is  the
  2951. vector  cross  product  of  the  two  vectors.  The  resulting   vector   is
  2952. perpendicular to the two original vectors and its length is  proportional  to
  2953. the angle between  them.  See  the  animated  demo  scene  VECT2.POV  for  an
  2954. illustration.
  2955.  
  2956. vdot(V1,V2): Dot product of V1 and V2. Returns a float value that is the  dot
  2957. product  (sometimes  called  scaler  product  of  V1  with  V2.  Formula  is
  2958. vdot=V1.x*V2.x + V1.y*V2.y + V1.z*V2.z. See the animated demo scene VECT2.POV
  2959. for an illustration.
  2960.  
  2961. vlength(V1): Length of V1. Returns a float value that is the length of vector
  2962. V1.  Can  be  used   to   compute   the   distance   between   two   points.
  2963. Dist=vlength(V2-V1). Formula is vlength=sqrt(vdot(V1,V1)).
  2964.  
  2965. vnormalize(V1): Normalize vector V1. Returns a unit length vector that is the
  2966. same direction as V1. Formula is vnormalize=V1/vlength(V1).
  2967.  
  2968. vrotate(V1,V2): Rotate V1 about origin by V2. Given the x,y,z coordinates  of
  2969. a point in space designated by the vector V1, rotate  that  point  about  the
  2970. origin by an amount specified by the vector V2. Rotate it about the x-axis by
  2971. an angle specified in degrees by the float value  V2.x.  Similarly  V2.y  and
  2972. V2.z specify the amount to rotate in degrees about the y-axis and z-axis. The
  2973. result is a vector containing the new x,y,z coordinates of the point.
  2974.  
  2975. 3.1.8.3          String Functions
  2976.  
  2977. The following are the functions which take  one  or  more  string  and  float
  2978. parameters and return string or float values. Assume that S1 and S2  are  any
  2979. valid strings and that A L and P are any valid expressions that  evaluate  to
  2980. floats.
  2981.  
  2982. asc(S1): ASCII value of S1. Returns an integer value in the range  0  to  255
  2983. that is the ASCII value of the first character of S1. For example  asc("ABC")
  2984. is 65 because that is the value of the character "A".
  2985.  
  2986. chr(A): Character whose ASCII value is A. Returns a single character  string.
  2987. The ASCII value of the character is specified by an integer A which  must  be
  2988. in the range 0 to 255. For example chr(70) is the string "F".
  2989.  
  2990. concat(S1,S2,[S3...]): Concatenate strings S1 and S2. Returns a  string  that
  2991. is the  concatenation  of  all  parameter  strings.  Must  have  at  least  2
  2992. parameters but may have more. For example:
  2993.  
  2994.   concat("Value is ", str(A,3,1), " inches")
  2995.  
  2996.  
  2997. If the float value A was 12.34 the result is "Value is 12.3 inches" which  is
  2998. a string.
  2999.  
  3000. file_exists(S1): Search for file specified by S1. Attempts to open  the  file
  3001. whose name is  specified  the  string  S1.  The  current  directory  and  all
  3002. directories specified in any Library_Path INI  options  or  +L  command  line
  3003. switches are searched. File is immediately closed. Returns a boolean value  1
  3004. on success and 0 on failure.
  3005.  
  3006. str(A,L,P): Convert float A to formatted string. Returns a  formatted  string
  3007. representation of float value A. The float parameter L specifies the  minimum
  3008. length of the string and the type  of  left  padding  used  if  the  string's
  3009. representation is shorter than the minimum. If L is positive then the padding
  3010. is with blanks. If L is negative then the padding is with zeros. The  overall
  3011. minimum length of the formatted string is abs(L). If the string needs  to  be
  3012. longer, it will be made as long as necessary to represent the value.
  3013.  
  3014. The float parameter P specifies the number of digits after the decimal point.
  3015. If P is negative then a compiler-specific default precision is use. Here  are
  3016. some examples:
  3017.  
  3018.   str(123.456,0,3)   "123.456"
  3019.   str(123.456,4,3)   "123.456"
  3020.   str(123.456,9,3)   "  123.456"
  3021.   str(123.456,-9,3)  "00123.456"
  3022.   str(123.456,0,2)   "123.46"
  3023.   str(123.456,0,0)   "123"
  3024.   str(123.456,5,0)   "  123"
  3025.   str(123.000,7,2)   " 123.00"
  3026.   str(123.456,0,-1)  "123.456000" (platform specific)
  3027.  
  3028.  
  3029. strcmp(S1,S2): Compare string S1 to S2. Returns a float  value  zero  if  the
  3030. strings are equal, a positive number if  S1  comes  after  S2  in  the  ASCII
  3031. collating sequence, else a negative number.
  3032.  
  3033. strlen(S1): Length of S1. Returns an integer value  that  is  the  number  of
  3034. characters in the string S1.
  3035.  
  3036. strlwr(S1): Lower case of S1. Returns a new string in which  all  upper  case
  3037. letters in the string S1 are converted to lower case. The original string  is
  3038. not affected. For example strlwr("Hello There!") results in "hello there!".
  3039.  
  3040. substr(S1,P,L): Sub-string from S1. Returns a string that is a subset of  the
  3041. characters in parameter S1 starting at the position specified by the  integer
  3042. value P  for  a  length  specified  by  the  integer  value  L.  For  example
  3043. substr("ABCDEFGHI",4,2) evaluates to the string "EF".  If  P+L>strlen(S1)  an
  3044. error occurs.
  3045.  
  3046. strupr(S1): Upper case of S1. Returns a new string in which  all  lower  case
  3047. letters in the string S1 are converted to upper case. The original string  is
  3048. not affected. For example strlwr("Hello There!") results in "HELLO THERE!".
  3049.  
  3050. val(S1):  Convert  string  S1  to  float.  Returns  a  float  value  that  is
  3051. represented by the text in S1. For  example  val("123.45")  is  123.45  as  a
  3052. float.
  3053.  
  3054. 3.2              Language Directives
  3055.  
  3056. The POV Scene Language contains several statements called language directives
  3057. which tell the file parser how to do its job. These directives can appear  in
  3058. almost any place in the scene file --- even  in  the  middle  of  some  other
  3059. statements. They are used to include  other  text  files  in  the  stream  of
  3060. commands, to declare identifiers, to define conditional or looped parsing and
  3061. to control other important aspects of scene file processing.
  3062.  
  3063. Each directive begins with the hash character # (often called a  number  sign
  3064. or pound sign). It is followed by a keyword and optionally other  parameters.
  3065.  
  3066.  
  3067. In versions of POV-Ray prior  to  3.0,  the  use  of  this  #  character  was
  3068. optional. Language directives could only be used between objects,  camera  or
  3069. light_source statements and could not appear  within  those  statements.  The
  3070. exception was the #include which could appear anywhere. Now that all language
  3071. directives can be used almost anywhere, the # character is mandatory.
  3072.  
  3073. The following keywords introduce language directives.
  3074.  
  3075.  
  3076. #break              #default            #statistics
  3077. #case               #else               #switch
  3078. #debug              #end                #version
  3079. #declare            #render             #warning
  3080.  
  3081.  
  3082.  
  3083. Earlier   versions   of   POV-Ray   considered    #max_intersections    and
  3084. #max_trace_level to be language directives but they have been  moved  to  the
  3085. global_settings statement. Their use  as  a  directive  still  works  but  it
  3086. generates a warning and may be discontinued in the future.
  3087.  
  3088. 3.2.1            Include Files
  3089.  
  3090. The language allows include files to be specified by placing the line:
  3091.  
  3092.   #include "filename.inc"
  3093.  
  3094.  
  3095. at any point in the input file. The filename may be specified  by  any  valid
  3096. string expression but it usually is  a  literal  string  enclosed  in  double
  3097. quotes. It may be up to  40  characters  long  (or  your  computer's  limit),
  3098. including the two double-quote (") characters.
  3099.  
  3100. The include file is read in as if it were inserted at that point in the file.
  3101. Using include is the same as actually cutting and pasting the entire contents
  3102. of this file into your scene.
  3103.  
  3104. Include files may be nested. You may have at most 10  nested  include  files.
  3105. There is no limit on un-nested include files.
  3106.  
  3107. Generally, include files  have  data  for  scenes,  but  are  not  scenes  in
  3108. themselves. By convention scene files end in .pov and include files end  with
  3109. .inc.
  3110.  
  3111. It  is  legal  to  specify  drive  and  directory  information  in  the  file
  3112. specification however it is discouraged because it  makes  scene  files  less
  3113. portable between various platforms.
  3114.  
  3115. It is typical to put standard  include  files  in  a  special  sub-directory.
  3116. POV-Ray can only read files in the current directory or one referenced by the
  3117. Library_Path option (See section "Library Paths" ).
  3118.  
  3119. 3.2.2            Declare
  3120.  
  3121. Identifiers may be declared and later referenced to  make  scene  files  more
  3122. readable and to parametrize scenes so  that  changing  a  single  declaration
  3123. changes many values. There are several  built-in  identifiers  which  POV-Ray
  3124. declares for you. See "Built-in Identifiers" for details.
  3125.  
  3126. 3.2.2.1          Declaring identifiers
  3127.  
  3128. An identifier is declared as follows.
  3129.  
  3130.   #declare IDENTIFIER = ITEM
  3131.  
  3132.  
  3133. Where IDENTIFIER is the name of the identifier up to 40 characters  long  and
  3134. ITEM is any of the following:
  3135.  
  3136.   float, vector, color or string expressions
  3137.   objects (all kinds)
  3138.   texture, pigment, normal, finish or halo
  3139.   color_map, pigment_map, slope_map, normal_map
  3140.   camera, light_source
  3141.   atmosphere
  3142.   fog
  3143.   rainbow
  3144.   skysphere
  3145.   transform
  3146.  
  3147.  
  3148. Here are some examples.
  3149.  
  3150.   #declare Rows = 5
  3151.   #declare Count = Count+1
  3152.   #declare Here = <1,2,3>
  3153.   #declare White = rgb <1,1,1>
  3154.   #declare Cyan = color blue 1.0  green 1.0
  3155.   #declare Font_Name = "ariel.ttf"
  3156.   #declare Ring = torus {5,1}
  3157.   #declare Checks = pigment{ checker White, Cyan }
  3158.  
  3159.   object{Rod scale y*5}         // not "cylinder{Rod}"
  3160.   object {
  3161.     Ring
  3162.     pigment {Checks scale 0.5}
  3163.     transform Skew
  3164.   }
  3165.  
  3166.  
  3167. Declarations, like most language directives, can appear anywhere in the  file
  3168. --- even within other statements. For example:
  3169.  
  3170.   #declare Here=<1,2,3>
  3171.   #declare Count=0                   // initialize Count
  3172.  
  3173.   union {
  3174.     object{Rod translate Here*Count}
  3175.     #declare Count=Count+1           // re-declare inside union
  3176.     object{Rod translate Here*Count}
  3177.     #declare Count=Count+1           // re-declare inside union
  3178.     object{Rod translate Here*Count}
  3179.   }
  3180.  
  3181.  
  3182. As this  example  shows,  you  can  re-declare  an  identifier  and  may  use
  3183. previously declared values in that re-declaration. However if you attempt  to
  3184. re-declare an identifier as anything other than its original  type,  it  will
  3185. generate a warning message.
  3186.  
  3187. Declarations may be nested inside each other within limits. In the example in
  3188. the previous section you could declare the entire union as a object.  However
  3189. for technical reasons you may not  use  any  language  directive  inside  the
  3190. declaration of floats, vectors or color expressions.
  3191.  
  3192. 3.2.3            Default Directive
  3193.  
  3194. POV-Ray creates a default texture when it begins processing. You  may  change
  3195. those defaults as described below. Every time you  specify  a  texture  {...}
  3196. statement, POV-Ray creates a copy of the default texture. Anything you put in
  3197. the texture statement  overrides  the  default  settings.  If  you  attach  a
  3198. pigment, normal, or finish to an object without any  texture  statement  then
  3199. POV-Ray checks to see if a texture has already been attached.  If  it  has  a
  3200. texture then the pigment, normal or finish will modify that existing texture.
  3201. If no texture has yet been attached to the object then the default texture is
  3202. copied and the pigment, normal or finish will modify that texture.
  3203.  
  3204. You may change the default texture,  pigment,  normal  or  finish  using  the
  3205. language directive #default {...} as follows:
  3206.  
  3207.   #default {
  3208.     texture {
  3209.       pigment {...}
  3210.       normal  {...}
  3211.       finish  {...}
  3212.     }
  3213.   }
  3214.  
  3215.  
  3216. Or you may change just part of it like this:
  3217.  
  3218.   #default {
  3219.     pigment {...}
  3220.   }
  3221.  
  3222.  
  3223. This still changes the pigment of the default texture. At any time  there  is
  3224. only one default texture made from the default pigment,  normal  and  finish.
  3225. The example above does not make a separate default for pigments alone.  Note:
  3226. Special textures tiles and material_map or a texture with a  texture_map  may
  3227. not be used as defaults.
  3228.  
  3229. You may change the defaults several times throughout a  scene  as  you  wish.
  3230. Subsequent #default statements begin with the defaults that were in effect at
  3231. the time. If you wish to reset to the  original  POV-Ray  defaults  then  you
  3232. should first save them as follows:
  3233.  
  3234.   //At top of file
  3235.   #declare Original_Default = texture {}
  3236.  
  3237.  
  3238. later after changing defaults you may restore it with...
  3239.  
  3240.   #default {texture {Original_Default}}
  3241.  
  3242.  
  3243. If you do not specify a texture for an object then  the  default  texture  is
  3244. attached when the object appears in the scene. It is  not  attached  when  an
  3245. object is declared. For example:
  3246.  
  3247.   #declare My_Object=
  3248.     sphere{<0,0,0>,1}  // Default texture not applied
  3249.   object{My_Object}    // Default texture added here
  3250.  
  3251.  
  3252. You may force a default texture  to  be  added  by  using  an  empty  texture
  3253. statement as follows:
  3254.  
  3255.   #declare My_Thing=
  3256.     sphere{<0,0,0>,1 texture{}}  // Default texture applied
  3257.  
  3258.  
  3259. The original  POV-Ray  defaults  for  all  items  are  given  throughout  the
  3260. documentation under each appropriate section.
  3261.  
  3262. 3.2.4            Version Directive
  3263.  
  3264. While many language changes have been made for POV-Ray 3.0,  all  of  version
  3265. 2.0 syntax and most of version 1.0 syntax still works. Whenever  possible  we
  3266. try to maintain backwards compatibility. One feature introduced in  2.0  that
  3267. was  incompatible  with  any  1.0  scene  files  is  the  parsing  of  float
  3268. expressions. Setting +MV1.0 command line switch or the Version=1.0 INI option
  3269. turns off expression parsing as well as many warning messages so that  nearly
  3270. all 1.0 files will still work. The changes between 2.0 and  3.0  are  not  as
  3271. extensive. Setting Version=2.0 is only necessary to  eliminate  some  warning
  3272. messages. Naturally the default setting for this option is Version=3.0
  3273.  
  3274. The #version language directive is used to change modes within  scene  files.
  3275. This switch or INI options only affects the initial setting.
  3276.  
  3277. Together with the built-in version identifier, the #version directive  allows
  3278. you to save and restore the previous values of  this  compatibility  setting.
  3279. For example suppose MYSTUFF.INC is in version 1.0 format. At the top  of  the
  3280. file you could put:
  3281.  
  3282.   #declare Temp_Vers = version // Save previous value
  3283.   #version 1.0                    // Change to 1.0 mode
  3284.  
  3285.   ... // Version 1.0 stuff goes here ...
  3286.  
  3287.   #version Temp_Vers              // Restore previous version
  3288.  
  3289.  
  3290. Previous versions of POV-Ray would not allow you to change versions inside an
  3291. object or declaration but that restriction has been lifted for POV-Ray 3.0.
  3292.  
  3293. Future versions of  POV-Ray  may  not  continue  to  maintain  full  backward
  3294. compatibility even with the #version directive. We strongly encourage you  to
  3295. phase in 3.0 syntax as much as possible.
  3296.  
  3297. 3.2.5            Conditional Directives
  3298.  
  3299. POV-Ray 3.0  allows  a  variety  of  new  language  directives  to  implement
  3300. conditional  parsing  of  various  sections  of  your  scene  file.  This  is
  3301. especially useful in describing the motion for animations but  it  has  other
  3302. uses as well. Also available  is  a  #while  loop  directive.  You  may  nest
  3303. conditional directives 200 levels deep.
  3304.  
  3305. 3.2.5.1          IF ELSE Directives
  3306.  
  3307. The simplest conditional directive is a traditional #if directive. It  is  of
  3308. the form...
  3309.  
  3310.   #if (COND)
  3311.     // This section is
  3312.     //  parsed if COND is true
  3313.   #else
  3314.     // This section is
  3315.     // parsed if COND is false
  3316.   #end // End of conditional part
  3317.  
  3318.  
  3319. where (COND) is a float expression that evaluates to a boolean value. A value
  3320. of 0.0 is false and any non-zero value is true.  Note  that  extremely  small
  3321. values of about 1e-10 are considered zero in case of round  off  errors.  The
  3322. parentheses around  the  condition  are  required.  The  #else  directive  is
  3323. optional. The #end directive is required.
  3324.  
  3325. 3.2.5.2          IFDEF Directives
  3326.  
  3327. The #ifdef directive is similar to the #if directive however it  is  used  to
  3328. determine if an identifier has been previously  declared.  After  the  #ifdef
  3329. directive instead of a boolean expression you put a lone identifier  enclosed
  3330. in parentheses. For example:
  3331.  
  3332.  #ifdef (User_Thing)
  3333.    // This section is parsed if the
  3334.    // identifier "User_Thing" was
  3335.    // previously declared
  3336.    object{User_Thing} // invoke identifier
  3337.  #else
  3338.    // This section is parsed if the
  3339.    // identifier "User_Thing" was not
  3340.    // previously declared
  3341.    box{<0,0,0>,<1,1,1>} // use a default
  3342.  #end
  3343.    // End of conditional part
  3344.  
  3345.  
  3346. 3.2.5.3          SWITCH CASE & RANGE Directives
  3347.  
  3348. A more powerful conditional is  the  #switch  directive.  The  syntax  is  as
  3349. follows...
  3350.  
  3351.   #switch (VALUE)
  3352.     #case (TEST_1)
  3353.       // This section is parsed if VALUE=TEST_1
  3354.     #break  //First case ends
  3355.  
  3356.     #case (TEST_2)
  3357.       // This section is parsed if VALUE=TEST_2
  3358.     #break  //Second case ends
  3359.  
  3360.     #range (LOW_1,HIGH_1)
  3361.       // This section is parsed if (VALUE>=LOW_1)&(VALUE<=HIGH_1)
  3362.     #break  //Third case ends
  3363.  
  3364.     #range (LOW_2,HIGH_2)
  3365.       // This section is parsed if (VALUE>=LOW_2)&(VALUE<=HIGH_2)
  3366.     #break  //Fourth case ends
  3367.  
  3368.     #else
  3369.       // This section is parsed if no other case or
  3370.       // range is true.
  3371.    #end // End of conditional part
  3372.  
  3373.  
  3374. The float expression VALUE following the #switch directive is  evaluated  and
  3375. compared to the values in the #case or #range directives. When  using  #case,
  3376. it is followed by a float expression TEST_1 in parentheses. It is compared to
  3377. the VALUE. As usual in POV-Ray, float comparisons  are  considered  equal  if
  3378. their difference is under 1e-10. If the values are equal,  parsing  continues
  3379. normally until  a  #break,  #else  or  #end  directive  is  reached.  If  the
  3380. comparison fails, POV-Ray skips until another #case or #range is found.
  3381.  
  3382. If you use the #range directive, it is  followed  by  two  float  expressions
  3383. LOW_1 and HIGH_1 which are enclosed in parentheses and separated by a  comma.
  3384. If the switch VALUE  is  in  the  range  specified,  then  parsing  continues
  3385. normally until a #break, #else or #end directive is reached. If the VALUE  is
  3386. outside the range, the comparison fails and POV-Ray skips until another #case
  3387. or #range is found.
  3388.  
  3389. If no #case or #range succeeds,  the  #else  section  is  parsed.  The  #else
  3390. directive is optional. If no #else is specified and no match  succeeds,  then
  3391. parsing resumes after the #end directive.
  3392.  
  3393. There may be any number of #case or #range directives in any order you  want.
  3394. If a segment evaluates true but no #break is specified, the parsing will fall
  3395. through to the next #case or #range and will continue until a  #break,  #else
  3396. or #end. Hitting a #break  while  parsing  a  successful  section  causes  an
  3397. immediate jump to the #end without processing subsequent sections, even if  a
  3398. subsequent condition would also have been satisfied.
  3399.  
  3400. 3.2.5.4          WHILE Directive
  3401.  
  3402. The #while directive is a  looping  feature  that  makes  it  easy  to  place
  3403. multiple objects in a pattern or other uses. The #while directive is followed
  3404. by a float expression that evaluates to a boolean value. A value  of  0.0  is
  3405. false and any non-zero value is true. Note that  extremely  small  values  of
  3406. about 1e-10 are considered zero in case of round off errors. The  parentheses
  3407. around the expression  are  required.  If  the  condition  is  true,  parsing
  3408. continues normally until an #end directive is reached. At  the  end,  POV-Ray
  3409. loops back to the #while directive and the condition is re-evaluated. Looping
  3410. continues until the condition fails. When it fails, parsing  continues  after
  3411. the #end directive. For example:
  3412.  
  3413.   #declare Count=0
  3414.   #while (Count < 5)
  3415.     object{MyObject translate x*3*Count}
  3416.     #declare Count=Count+1
  3417.   #end
  3418.  
  3419.  
  3420. This example places five copies of MyObject in a row spaced three units apart
  3421. in the x direction.
  3422.  
  3423. 3.2.6            User Message Directives
  3424.  
  3425. With the addition of conditional and loop directives,  the  POV-Ray  language
  3426. has the potential to be more like an actual programming language. This  means
  3427. that it will be necessary to have some way to  see  what  is  going  on  when
  3428. trying to debug loops and conditionals. To fulfill this need  we  have  added
  3429. the ability to print text messages to the screen. You have a choice  of  five
  3430. different text streams to use including the ability to generate a fatal error
  3431. if you find it necessary. Limited formatting is available for strings  output
  3432. by this method.
  3433.  
  3434. 3.2.6.1          Text Message Streams
  3435.  
  3436. The syntax for a text message is any of the following:
  3437.  
  3438.   #debug      STRING
  3439.   #error      STRING
  3440.   #fatal      STRING
  3441.   #render     STRING
  3442.   #statistics STRING
  3443.   #warning    STRING
  3444.  
  3445.  
  3446. Where STRING is any valid string of  text  including  string  identifiers  or
  3447. functions which return strings.
  3448.  
  3449. For example:
  3450.  
  3451.   #switch (clock*360)
  3452.     #range (0,180)
  3453.       #render "Clock in 0 to 180 range\n"
  3454.     #break
  3455.  
  3456.     #range (180,360)
  3457.       #render "Clock in 180 to 360 range\n"
  3458.     #break
  3459.  
  3460.     #else
  3461.       #warning "Clock outside expected range\n"
  3462.       #warning concat("Value is:",str(clock*360,5,0),"\n")
  3463.   #end
  3464.  
  3465.  
  3466. There are seven distinct text streams that POV-Ray uses for output.  You  may
  3467. output only to five of them. On some versions  of  POV-Ray,  each  stream  is
  3468. designated by a particular color.  Text  from  these  streams  are  displayed
  3469. whenever it is appropriate so there is often an intermixing of the text.  The
  3470. distinction is only important if you choose to turn some of the  streams  off
  3471. or to direct some of the streams to text files. On some systems  you  may  be
  3472. able to review the streams separately in their own  scroll-back  buffer.  See
  3473. "Console Text Output" for details on re-directing the streams to a text file.
  3474.  
  3475.  
  3476. Here is a description of how POV-Ray uses each stream. You may use  them  for
  3477. whatever purpose you want except note that use of the #fatal stream causes  a
  3478. fatal error after the text is displayed.
  3479.  
  3480. DEBUG: This stream displays debugging messages. It was primarily designed for
  3481. developers but this and other streams may also be used by the user to display
  3482. messages from within their scene files.
  3483.  
  3484. FATAL: This stream displays fatal error messages. After displaying this text,
  3485. POV-Ray will terminate. When the error is a scene parsing error, you  may  be
  3486. shown several lines of scene text that leads up to the error.
  3487.  
  3488. RENDER:  This  stream  displays  information  about  what  options  you  have
  3489. specified to render the scene. It includes  feedback  on  all  of  the  major
  3490. options such as scene name, resolution, animation settings, anti-aliasing and
  3491. others.
  3492.  
  3493. STATISTICS: This stream displays statistics after a  frame  is  rendered.  It
  3494. includes information about the number of rays traced, the length of  time  of
  3495. the processing and other information.
  3496.  
  3497. WARNING: This stream displays warning messages during the  parsing  of  scene
  3498. files and other warnings. Despite the warning, POV-Ray can continue to render
  3499. the scene.
  3500.  
  3501.  
  3502. 3.2.6.2          Text Formatting
  3503.  
  3504. Some  escape  sequences  are  available  to  include  non-printing   control
  3505. characters in your text. These sequences are similar to those used in  string
  3506. literals in the C programming language. Note that  these  control  characters
  3507. only apply in text message directives. They are  not  implemented  for  other
  3508. string usage in POV-Ray such as text objects or file names. Depending on what
  3509. platform you are using, they may not be fully supported for  console  output.
  3510. However they will appear in any text file if you  re-direct  a  stream  to  a
  3511. file. The sequences are:
  3512.  
  3513.   "\a" Bell or alarm, 0x07
  3514.   "\b" Backspace, 0x08
  3515.   "\f" Form feed, 0x0C
  3516.   "\n" New line (line feed) 0x0A
  3517.   "\r" Carriage return 0x0D
  3518.   "\t" Horizontal tab 0x09
  3519.   "\v" Vertical tab 0x0B
  3520.   "\0" Null 0x00
  3521.   "\\" Backslash 0x5C
  3522.   "\'" Single quote 0x27
  3523.  
  3524.  
  3525. For example:
  3526.  
  3527.   #debug "This is one line.\nBut this is another"
  3528.  
  3529.  
  3530. 3.3              POV-Ray Coordinate System
  3531.  
  3532. Objects, lights, and the camera are positioned using a typical 3D  coordinate
  3533. system. The usual coordinate system for  POV-Ray  has  the  positive  Y  axis
  3534. pointing up, the positive X axis pointing to the right, and  the  positive  Z
  3535. axis pointing into the screen. The negative values  of  the  axes  point  the
  3536. other direction, as follows:
  3537.  
  3538.           ^+Y
  3539.           |   /+Z
  3540.           |  /
  3541.           | /
  3542.  -X       |/      +X
  3543.   <-------|-------->
  3544.          /|
  3545.         / |
  3546.        /  |
  3547.     -Z/   |
  3548.           v-Y
  3549. The left-handed coordinate system.
  3550.  
  3551. Locations within that coordinate system are  usually  specified  by  a  three
  3552. component vector. The three values correspond to the x, y  and  z  directions
  3553. respectively. For example, the vector <1,2,3> means the point that's  1  unit
  3554. to the right, 2 units up, and 3 units in front the center of  the  "universe"
  3555. at <0,0,0>.
  3556.  
  3557. Vectors are not always points, though. They can also refer to  an  amount  to
  3558. size, move, or rotate a scene  element  or  to  modify  the  texture  pattern
  3559. applied to an object.
  3560.  
  3561. The supported transformations are rotate, scale, and translate. They are used
  3562. to turn, size, and translate an object or texture.  A  transformation  matrix
  3563. may also be used to specify complex transformations directly.
  3564.  
  3565. 3.3.1            Transformations
  3566.  
  3567. The supported transformations are rotate, scale, and translate. They are used
  3568. to turn, size, and translate an object or texture.
  3569.  
  3570.   rotate <VECTOR>
  3571.   scale <VECTOR>
  3572.   translate <VECTOR>
  3573.  
  3574.  
  3575. 3.3.1.1          Translate
  3576.  
  3577. An object or texture pattern may be moved by adding a translate parameter. It
  3578. consists of the keyword translate followed by a vector expression. The  terms
  3579. of the vector specify the number of units to move in each of the x, y, and  z
  3580. directions. Translate moves the element relative to  it's  current  position.
  3581. For example
  3582.  
  3583.   sphere { <10, 10, 10>, 1
  3584.     pigment { Green }
  3585.     translate <-5, 2, 1>
  3586.   }
  3587.  
  3588.  
  3589. Will move the sphere from <10,10,10> to <-5,12,11>. It does not  move  it  to
  3590. absolute location <-5,2,1>.  Translating  by  zero  will  leave  the  element
  3591. unchanged on that axis. For example:
  3592.  
  3593.   sphere { <10, 10, 10>, 1
  3594.     pigment { Green }
  3595.     translate 3*x // evaluates to <3,0,0> so move 3 units
  3596.                   // in the x direction and none along y or z
  3597.   }
  3598.  
  3599.  
  3600. 3.3.1.2          Scale
  3601.  
  3602. You may change the size of an object or texture pattern  by  adding  a  scale
  3603. parameter. It consists of the keyword scale followed by a vector  expression.
  3604. The 3 terms of the vector specify the amount of scaling in each of the x,  y,
  3605. and z directions.
  3606.  
  3607. Scale, is used to "stretch" or "squish" an  element.  Values  larger  than  1
  3608. stretch the element on that axis. Values smaller than one are used to  squish
  3609. the element on that axis. Scale is relative to the current element  size.  If
  3610. the element has been previously re-sized using scale, then  scale  will  size
  3611. relative to the new size. Multiple scale values may used.
  3612.  
  3613. For example:
  3614.  
  3615.   sphere { <0,0,0>, 1
  3616.     scale <2,1,0.5>
  3617.   }
  3618.  
  3619.  
  3620. This stretches and smashes the sphere into an ellipsoid shape that  is  twice
  3621. the original size along the x direction, remains  the  same  size  in  the  y
  3622. direction, and is half the original size in the z direction.
  3623.  
  3624. If a lone float expression is specified, it is  promoted  to  a  3  component
  3625. vector whose terms are all the same. Thus the item is uniformly scaled by the
  3626. same amount in all directions. For example:
  3627.  
  3628.   object {
  3629.     MyObject
  3630.     scale 5 // Evaluates as <5,5,5> so uniformly scale
  3631.             // by 5 in every direction.
  3632.   }
  3633.  
  3634.  
  3635. 3.3.1.3          Rotate
  3636.  
  3637. You may change the orientation of an object or texture pattern  by  adding  a
  3638. rotate parameter. It consists of the keyword  rotate  followed  by  a  vector
  3639. expression. The three terms of the vector specify the number  of  degrees  to
  3640. rotate about each of the x, y, and z axes.
  3641.  
  3642. Note that the order of the rotations does matter. Rotations occur about the x
  3643. axis first, then the y axis, then the z axis. If you are not sure if this  is
  3644. what you want then you should only  rotate  on  one  axis  at  a  time  using
  3645. multiple rotation statements to get a correct rotation. As in,
  3646.  
  3647.   rotate <0, 30, 0>  // 30 degrees around Y axis then,
  3648.   rotate <-20, 0, 0> // -20 degrees around X axis then,
  3649.   rotate <0, 0, 10>  // 10 degrees around Z axis.
  3650.  
  3651.  
  3652. Rotation is always performed relative to the axis. Thus if an object is  some
  3653. distance from the axis of rotation, its will not  only  rotate  but  it  will
  3654. "orbit" about the axis as though it  was  swinging  around  on  an  invisible
  3655. string.
  3656.  
  3657. To work out the rotation directions, you must perform  the  famous  "Computer
  3658. Graphics Aerobics" exercise. Hold up your left hand. Point your thumb in  the
  3659. positive direction of the axis of rotation. Your fingers  will  curl  in  the
  3660. positive direction of rotation. Similarly if you  point  your  thumb  in  the
  3661. negative direction of the  axis  your  fingers  will  curl  in  the  negative
  3662. direction of rotation. This is the famous "left-hand coordinate system".
  3663.  
  3664.            ^
  3665.          +Y|   +Z/ _
  3666.            |    /_| |_  _
  3667.            |   _| | | |/ \
  3668.            |  | | | | |  |
  3669.            | /| | | | |  V
  3670.  -X        |/ | | | | |    +X
  3671. <----------+--|-|-|-|-|------>
  3672.           /|  |       \____
  3673.          / |  |         ___|
  3674.         /  |  \        /
  3675.        /   |   |      /
  3676.     -Z/  -Y|
  3677.      /     |
  3678. "Computer Graphics Aerobics" to determine the rotation direction.
  3679.  
  3680. In this illustration, the left hand is curling around the x axis.  The  thumb
  3681. points in the positive x direction and the fingers curl over in the  positive
  3682. rotation direction.
  3683.  
  3684. If you want to use a right hand system, as some CAD systems such  as  AutoCAD
  3685. do, the right vector in the camera specification needs to be changed. See the
  3686. detailed description of the camera. In a right handed  system  you  use  your
  3687. right hand for the "Aerobics".
  3688.  
  3689. Note: There is some controversy over whether  POV-Ray's  method  of  doing  a
  3690. right-handed system is really proper.  If  you  want  to  avoid  problems  we
  3691. suggest you stick with the left-handed system which is not in dispute.
  3692.  
  3693. 3.3.1.4          Matrix Keyword
  3694.  
  3695. The matrix keyword can be  used  to  explicitly  specify  the  transformation
  3696. matrix to be used for objects or textures. Its syntax is:
  3697.  
  3698.   matrix < M00, M01, M02,
  3699.            M10, M11, M12,
  3700.            M20, M21, M22,
  3701.            M30, M31, M32 >
  3702.  
  3703.  
  3704. Where M00 through M32 are float expressions that specify the  elements  of  a
  3705. 4x4 matrix with the fourth column implicitly <0,0,0,1>. A  point  P=<px,  py,
  3706. pz> is transformed into Q=(qx, qy, qz) by
  3707.  
  3708.   qx = M00 * px + M10 * py + M20 * pz + M30
  3709.   qy = M01 * px + M11 * py + M21 * pz + M31
  3710.   qz = M02 * px + M12 * py + M22 * pz + M32
  3711.  
  3712.  
  3713. Normally you won't use the matrix keyword because it's less descriptive  than
  3714. the transformation commands and harder to visualize. There is an intersecting
  3715. aspect of the matrix command though. It allows  more  general  transformation
  3716. like shearing. The following matrix causes an object to be sheared along  the
  3717. y axis.
  3718.  
  3719.   object {
  3720.     MyObject
  3721.     matrix < 1, 1, 0,
  3722.              0, 1, 0,
  3723.              0, 0, 0,
  3724.              0, 0, 0 >
  3725.   }
  3726.  
  3727.  
  3728. 3.3.2            Transformation Order
  3729.  
  3730. Because rotations are always relative to the axis and scaling is relative  to
  3731. the origin, you will generally want to create an object  at  the  origin  and
  3732. scale and rotate it  first.  Then  you  may  translate  it  into  its  proper
  3733. position. It is a common mistake to carefully position an object and then  to
  3734. decide to rotate it. Because a rotation of an object causes it to  orbit  the
  3735. axis, the position of the object may change so much that it orbits out of the
  3736. field of view of the camera!
  3737.  
  3738. Similarly scaling after translation also moves an object unexpectedly.  Ifyou
  3739. scale after you translate, the scale will multiply the translate amount.  For
  3740. example:
  3741.  
  3742.   translate <5, 6, 7>
  3743.   scale 4
  3744.  
  3745.  
  3746. Will translate to 20, 24, 28 instead of 5, 6, 7. Be careful when transforming
  3747. to get the order correct for your purposes.
  3748.  
  3749. 3.3.3            Transform Identifiers
  3750.  
  3751. At times it is useful to combine together several transformations  and  apply
  3752. them in multiple places. A transform identifier may be used for this purpose.
  3753. Transform identifiers are declared as follows:
  3754.  
  3755.   #declare IDENT=transform { TRANSFORMATION... }
  3756.  
  3757.  
  3758. Where IDENT is the identifier to be declared and  TRANSFORMATION  is  one  or
  3759. more translate, rotate,  scale  or  matrix  specifications  or  a  previously
  3760. declared transform identifier. A  transform  identifier  is  invoked  by  the
  3761. transform keyword without any brackets as shown here:
  3762.  
  3763.   object {
  3764.     MyObject           // Get a copy of MyObject
  3765.     transform MyTrans  // Apply the transformation
  3766.     translate -x*5     // Then move it 5 units left
  3767.   }
  3768.   object {
  3769.     MyObject           // Get another copy of MyObject
  3770.     transform MyTrans  // Apply the same transformation
  3771.     translate -x*5     // Then move this one 5 units right
  3772.   }
  3773.  
  3774.  
  3775. On extremely complex CSG objects with lots of components,  it  may  speed  up
  3776. parsing if you apply a declared transformation  rather  than  the  individual
  3777. translate, rotate, scale or matrix specifications. The transform is  attached
  3778. just once to each component.  Applying  each  individual  translate,  rotate,
  3779. scale or matrix specifications takes long.  This  only  affects  parsing  ---
  3780. rendering works the same either way.
  3781.  
  3782. 3.3.4            Transforming Textures and Objects
  3783.  
  3784. When an object is transformed, all textures attached to the  object  at  that
  3785. time are transformed as well. This  means  that  if  you  have  a  translate,
  3786. rotate, scale or matrix in an object before a texture, the texture  will  not
  3787. be transformed. If the transformation is after the texture then  the  texture
  3788. will be transformed with the object. If  the  transformation  is  inside  the
  3789. texture {...} statement then only the texture is affected. The shape  remains
  3790. the same. For example:
  3791.  
  3792.   sphere { 0, 1
  3793.     texture { Jade }  // texture identifier from TEXTURES.INC
  3794.     scale 3           // this scale affects both the
  3795.                       // shape and texture
  3796.   }
  3797.  
  3798.   sphere { 0, 1
  3799.     scale 3           // this scale affects the shape only
  3800.     texture { Jade }
  3801.   }
  3802.  
  3803.   sphere { 0, 1
  3804.     texture {
  3805.       Jade
  3806.       scale 3         // this scale affects the texture only
  3807.     }
  3808.   }
  3809.  
  3810.  
  3811. Transformations may also be independently applied  to  pigment  patterns  and
  3812. surface normal (bump) patterns. Note scaling a normal  pattern  affects  only
  3813. the width and spacing. It does not affect the apparent height or depth of the
  3814. bumps. For example:
  3815.  
  3816.   box { <0, 0, 0>, <1, 1, 1>
  3817.     texture {
  3818.       pigment {
  3819.         checker Red, White
  3820.         scale 0.25 // This affects only the color pattern
  3821.       }
  3822.       normal {
  3823.         bumps 0.3  // This specifies apparent height of bumps
  3824.         scale 0.2  // Scales diameter and space between bumps
  3825.                    // but not the height. Has no effect on
  3826.                    // color pattern.
  3827.       }
  3828.       rotate y*45  // This affects the entire texture but
  3829.     }              // not the object.
  3830.   }
  3831.  
  3832.  
  3833. 3.4              Camera
  3834.  
  3835. The camera definition describes the position, projection type and  properties
  3836. of the camera viewing the scene. Its syntax is:
  3837.  
  3838.   camera {
  3839.     [ perspective | orthographic | fisheye |
  3840.       ultra_wide_angle | omnimax | panoramic |
  3841.       cylinder FLOAT ]
  3842.     location <VECTOR>
  3843.     look_at <VECTOR>
  3844.     right <VECTOR>
  3845.     up <VECTOR>
  3846.     direction <VECTOR>
  3847.     sky <VECTOR>
  3848.     right <VECTOR>
  3849.     angle FLOAT
  3850.     blur_samples FLOAT
  3851.     aperture FLOAT
  3852.     focal_point <VECTOR>
  3853.     normal { NORMAL }
  3854.   }
  3855.  
  3856.  
  3857. Depending on the projection type some of the parameters  are  required,  some
  3858. are optional and some aren't  used.  If  no  projection  type  is  given  the
  3859. perspective projection will  be  used  (pinhole  camera).  If  no  camera  is
  3860. specified a default camera is used.
  3861.  
  3862. Regardless of the projection type all cameras use the "location",  "look_at",
  3863. "right", "up", "direction", and "sky" keywords to determine the location  and
  3864. orientation of the camera. Their meaning differs  with  the  projection  type
  3865. used. A more detailed explanation of the camera placement follows later.
  3866.  
  3867. 3.4.1            Type of Projection
  3868.  
  3869. The following list explains the different projection types that can  be  used
  3870. with the camera. The most common types are the perspective  and  orthographic
  3871. projections.
  3872.  
  3873. Perspective  projection:  This  projection  represents  the  classic  pinhole
  3874. camera. The viewing angle is either determined by the length of the direction
  3875. vector or by the optional keyword "angle". The viewing angle has to be larger
  3876. than 0 degrees and smaller than 180 degrees.
  3877.  
  3878. Orthographic projection: This projection uses parallel camera rays to  create
  3879. an image of the scene. The size of the image is determined by the lengths  of
  3880. the  right  and  up  vectors.  The  "angle"  keyword  isn't  used  with  this
  3881. projection.
  3882.  
  3883. Fisheye projection: This is a spherical  projection.  The  viewing  angle  is
  3884. specified by the "angle"  keyword.  An  angle  of  180  degrees  creates  the
  3885. "standard" fisheye while an angle of  360  degrees  creates  a  super-fisheye
  3886. ("I-see-everything-view"). If you  use  this  projection  you  should  get  a
  3887. circular image. If this isn't the case, i.e. you get an elliptical image, you
  3888. should read "Aspect Ratio" .
  3889.  
  3890. Ultra wide angle projection: This  projection  is  somewhat  similar  to  the
  3891. fisheye but it projects the image onto a rectangle instead of a  circle.  The
  3892. viewing angle can be specified using the "angle" keyword.
  3893.  
  3894. Omnimax projection: The omnimax projection is a 180 degrees fisheye that  has
  3895. a reduced viewing angle in the vertical direction. In reality this projection
  3896. is used to make movies that can be viewed in the dome-like Omnimax  theaters.
  3897. The image will look somewhat elliptical. The "angle" keyword isn't used  with
  3898. this projection.
  3899.  
  3900. Panoramic projection: This projection is called "cylindrical  equirectangular
  3901. projection".  It  overcomes  the  degeneration  problem  of  the  perspective
  3902. projection if the viewing angle approaches 180 degrees. It uses some kind  of
  3903. cylindrical projection to be able to  use  viewing  angles  larger  than  180
  3904. degrees with a tolerable lateral-stretching distortion. The  "angle"  keyword
  3905. is used to determine the viewing angle.
  3906.  
  3907. Cylindrical projection: Using this projection the scene is projected  onto  a
  3908. cylinder. There are four different types of cylindrical projections depending
  3909. on the orientation of the cylinder and the position  of  the  viewpoint.  The
  3910. viewing angle and the  length  of  the  up  or  right  vector  determine  the
  3911. dimensions of the camera  and  the  visible  image.  The  camera  to  use  is
  3912. specified by a number. The types are:
  3913.  
  3914.   1 vertical cylinder, fixed viewpoint
  3915.   2 horizontal cylinder, fixed viewpoint
  3916.   3 vertical cylinder, viewpoint moves along the cylinder's axis
  3917.   4 horizontal cylinder, viewpoint moves along the cylinder's axis
  3918.  
  3919.  
  3920. The "angle" keyword overrides the viewing angle specified by the  "direction"
  3921. keyword and vice versa.
  3922.  
  3923. There is no limitation to  the  viewing  angle  except  for  the  perspective
  3924. projection. If you choose viewing angles larger than 360 degrees  you'll  see
  3925. repeated images of the scene (the way the repetition takes place  depends  on
  3926. the camera). This might be useful for special effects.
  3927.  
  3928. You should note that the vista buffer can only be used with  the  perspective
  3929. and orthographic camera.
  3930.  
  3931. 3.4.2            Focal Blur
  3932.  
  3933. Simulates focal depth-of-field by shooting  a  number  of  sample  rays  from
  3934. jittered points within each pixel, and averaging the results.
  3935.  
  3936. The aperture setting determines  the  depth  of  the  sharpness  zone.  Large
  3937. apertures give a lot of blurring, while narrow apertures  will  give  a  wide
  3938. zone of sharpness. Note that, while this behaves as a real camera  does,  the
  3939. values for aperture are purely arbitrary, and are not related to f-stops.
  3940.  
  3941. The center of the "zone of sharpness" is the focal_point vector (the  default
  3942. focal_point is <0,0,0>).
  3943.  
  3944. The blur_samples value controls the maximum number of rays to  use  for  each
  3945. pixel. More rays give a smoother appearance, but is slower, although this  is
  3946. controlled somewhat by an adaptive mechanism that stops shooting rays when  a
  3947. certain degree of confidence has been reached that shooting more  rays  would
  3948. not result in a significant change.
  3949.  
  3950. The confidence and variance variables  control  the  adaptive  function.  The
  3951. confidence value is used to determine when the  samples  seem  to  be  "close
  3952. enough" to the correct color. The  variance  value  specifies  an  acceptable
  3953. tolerance on the variance of the samples taken so far. In  other  words,  the
  3954. process of shooting sample rays is terminated when the estimated color  value
  3955. is very likely (as controlled by the confidence probability)  near  the  real
  3956. color value.
  3957.  
  3958. Since the confidence is a probability its values can range from 0 to  1  (the
  3959. default is 0.9, i.e. 90%). The value for the variance should be in the  range
  3960. of the smallest displayable color difference (the default is 1/128).
  3961.  
  3962. Larger confidence values will lead to more samples, slower traces and  better
  3963. images. The same holds for smaller variance thresholds.
  3964.  
  3965. By default no focal blur is used, i.e. the default  aperture  is  0  and  the
  3966. default number of samples is 0.
  3967.  
  3968. 3.4.3            Camera Ray Perturbation
  3969.  
  3970. The optional keyword "normal" may be used to assign a normal pattern  to  the
  3971. camera. All camera rays will be perturbed using this pattern. This  lets  you
  3972. create special effects. See animated scene CAMERA2.POV for an example.
  3973.  
  3974. 3.4.4            Placing the Camera
  3975.  
  3976. In the  following  sections  the  placing  of  the  camera  will  be  further
  3977. explained.
  3978.  
  3979. 3.4.4.1          Location and Look_At
  3980.  
  3981. Under many circumstances just two vectors in the camera statement are all you
  3982. need to position the camera: location and look_at. For example:
  3983.  
  3984.   camera {
  3985.     location <3,5,-10>
  3986.     look_at  <0,2,1>
  3987.   }
  3988.  
  3989.  
  3990. The location is simply the X, Y, Z coordinates of the camera. The camera  can
  3991. be located anywhere in the ray tracing universe. The default location is  <0,
  3992. 0, 0>. The look_at vector tells POV-Ray to pan and tilt the camera  until  it
  3993. is looking at the specified X, Y, Z coordinate. By default the  camera  looks
  3994. at a point one unit in the +Z direction from the location.
  3995.  
  3996. The look_at specification should almost always be the last item in the camera
  3997. statement. If other camera items are placed after the look_at vector then the
  3998. camera may not continue to look at the specified point.
  3999.  
  4000. 3.4.4.2          The Sky Vector
  4001.  
  4002. Normally POV-Ray pans left or right by rotating about the  Y  axis  until  it
  4003. lines up with the look_at point and then tilts straight up or down until  the
  4004. point is met exactly. However you may want to slant the camera sideways  like
  4005. an airplane making a banked turn. You may change the tilt of the camera using
  4006. the "sky" vector. For example:
  4007.  
  4008.   camera {
  4009.     location <3,5,-10>
  4010.     sky      <1,1,0>
  4011.     look_at  <0,2,1>
  4012.   }
  4013.  
  4014.  
  4015. This tells POV-Ray to roll the camera until the top of the camera is in  line
  4016. with the sky vector. Imagine that the sky vector is an antenna  pointing  out
  4017. of the top of the camera. Then it uses  the  "sky"  vector  as  the  axis  of
  4018. rotation left or right and then to tilt up or down in  line  with  the  "sky"
  4019. vector. In effect you're  telling  POV-Ray  to  assume  that  the  sky  isn't
  4020. straight up. Note that the sky vector must appear before the look_at  vector.
  4021.  
  4022.  
  4023. The sky vector does nothing on its own. It only modifies the way the  look_at
  4024. vector turns the camera. The default value for sky is <0, 1, 0>.
  4025.  
  4026. 3.4.4.3          The Direction Vector
  4027.  
  4028. The "direction" vector tells POV-Ray  the  initial  direction  to  point  the
  4029. camera before moving it with look_at or rotate vectors. It may also  be  used
  4030. to control the field of view with some types of projection.  This  should  be
  4031. done using the easier to use "angle" keyword though.
  4032.  
  4033. The default value is direction <0, 0, 1>
  4034.  
  4035. The length of the direction vector determines  the  field  of  view  for  the
  4036. perspective projection. It is the distance from the camera  location  to  the
  4037. imaginary "view window" that you  are  looking  through.  A  short  direction
  4038. vector gives a wide angle  view  while  a  long  direction  gives  a  narrow,
  4039. telephoto view. You should be careful with small  direction  vector  lengths,
  4040. i.e. large viewing angles. You may experience distortion on the edges of your
  4041. images. Objects will appear to be shaped strangely. If this happens, move the
  4042. location back and make the direction vector longer or  decrease  the  viewing
  4043. angle.
  4044.  
  4045. If you are using the ultra wide angle, panoramic  or  cylindrical  projection
  4046. you should use a unit length direction vector to avoid strange results.
  4047.  
  4048. The length of the direction vector doesn't matter if  one  of  the  following
  4049. projection types is used: orthographic, fisheye, or omnimax.
  4050.  
  4051. 3.4.4.4          Up and Right Vectors
  4052.  
  4053. The direction of the "up" and "right" vectors (together  with  the  direction
  4054. vector) determine the orientation of the camera in the scene.  They  are  set
  4055. implicitly by their default values of
  4056.  
  4057.   right 4/3*x
  4058.   up y
  4059.  
  4060.  
  4061. or the "look_at" parameter (in combination with "location").  The  directions
  4062. of an explicitly specified right and up vector  will  be  overridden  by  any
  4063. following "look_at" parameter.
  4064.  
  4065. While some camera types ignore the length of these vectors others use  it  to
  4066. extract valuable information about the camera settings.  The  following  list
  4067. will explain the meaning of the right and up vector  for  each  camera  type.
  4068. Since the direction the vectors is always used to describe the orientation of
  4069. the camera it will not be explained again.
  4070.  
  4071. Perspective projection: The lengths of the up and right vectors are  used  to
  4072. set the size of the viewing window and  the  aspect  ratio  as  described  in
  4073. detail in section "Aspect Ratio" . Since the field of  view  depends  on  the
  4074. length of the direction vector (implicitly set  by  the  "angle"  keyword  or
  4075. explicitly set by the "direction" keyword) and the lengths of the  right  and
  4076. up vectors you should carefully choose them  in  order  to  get  the  desired
  4077. results.
  4078.  
  4079. Orthographic projection: The lengths of the right and up vector set the  size
  4080. of the viewing window regardless of the direction vector length, which is not
  4081. used by the orthographic camera. Again the relation of the lengths is used to
  4082. set the aspect ratio.
  4083.  
  4084. Fisheye projection: The right and up vectors  are  used  to  set  the  aspect
  4085. ratio.
  4086.  
  4087. Ultra wide angle projection: The up and right vectors work in a  similar  way
  4088. as for the perspective camera.
  4089.  
  4090. Omnimax projection: The omnimax projection is a 180 degrees fisheye that  has
  4091. a reduced viewing angle in the vertical direction. In reality this projection
  4092. is used to make movies that can be viewed in the dome-like Omnimax  theaters.
  4093. The image will look somewhat elliptical. The "angle" keyword isn't used  with
  4094. this projection.
  4095.  
  4096. Panoramic projection: The up and right vectors work in a similar way  as  for
  4097. the perspective camera.
  4098.  
  4099. Cylindrical projection: In cylinder type 1 and 3 the  axis  of  the  cylinder
  4100. lies along the "up" vector and the width  is  determined  by  the  length  of
  4101. "right" vector or it may be overridden with the "angle" vector. In type 3 the
  4102. "up" vector determines how many units high the image is. For example  if  you
  4103. have "up 4*y" on a camera at the origin. Only points from  y=2  to  y=-2  are
  4104. visible. All viewing rays are perpendicular to the y-axis. For type 2 and  4,
  4105. the cylinder lies along the "right" vector.  Viewing  rays  for  type  4  are
  4106. perpendicular to the "right" vector.
  4107.  
  4108.  
  4109.  
  4110. Note  that  the  up,  right,  and  direction  vectors  should  always  remain
  4111. perpendicular to each other or the image will be distorted. If  this  is  not
  4112. the case a warning message will be printed.
  4113.  
  4114. 3.4.4.4.1        Aspect Ratio
  4115.  
  4116. Together these vectors define the "aspect ratio" (height to width  ratio)  of
  4117. the resulting image. The default values "up <0, 1, 0>" and "right  <1.33,  0,
  4118. 0>" results in an aspect ratio of about 4 to 3. This is the aspect ratio of a
  4119. typical computer monitor. If you wanted a tall skinny image or a  short  wide
  4120. panoramic image or a perfectly square image you  should  adjust  the  up  and
  4121. right vectors to the appropriate proportions.
  4122.  
  4123. Most computer video modes and graphics printers use perfectly square  pixels.
  4124. For example Macintosh displays and  IBM  S-VGA  modes  640x480,  800x600  and
  4125. 1024x768 all use square pixels. When your intended viewing method uses square
  4126. pixels then the width and height you set with the +W and +H  switches  should
  4127. also have the same ratio as the right and up vectors. Note that 640/480 = 4/3
  4128. so the ratio is proper for this square pixel mode.
  4129.  
  4130. Not all display modes use square pixels however. For  example  IBM  VGA  mode
  4131. 320x200 and Amiga 320x400 modes do not use square  pixels.  These  two  modes
  4132. still produce a 4/3 aspect ratio  image.  Therefore  images  intended  to  be
  4133. viewed on such hardware should still use 4/3 ratio  on  their  up  and  right
  4134. vectors but the +W and +H settings will not be 4/3.
  4135.  
  4136. For example:
  4137.  
  4138.   camera {
  4139.     location <3,5,-10>
  4140.     up       <0,1,0>
  4141.     right    <1,0,0>
  4142.     look_at  <0,2,1>
  4143.   }
  4144.  
  4145.  
  4146. This specifies a perfectly square image. On a square pixel display like  SVGA
  4147. you would use +W and +H settings such as +W480 +H480 or +W600 +H600.  However
  4148. on the non-square pixel Amiga 320x400 mode you would want to  use  values  of
  4149. +W240 +H400 to render a square image.
  4150.  
  4151. 3.4.4.4.2        Handedness
  4152.  
  4153. The "right" vector also describes the direction to the right of  the  camera.
  4154. It tells POV-Ray where the right side of your screen  is.  The  sign  of  the
  4155. right vector can be used to determine the handedness of the coordinate system
  4156. in use. The default right statement is:
  4157.  
  4158.   right <1.33, 0, 0>
  4159.  
  4160.  
  4161. This whole explanation needs work. DLR
  4162.  
  4163. The left-handed coordinate system.
  4164.  
  4165. This means that the +X direction is to the  right.  It  is  called  a  "left-
  4166. handed" system because you can use your left hand to keep track of the  axes.
  4167. Hold out your left hand with your palm facing to your right. Stick your thumb
  4168. up. Point straight ahead with your index finger. Point your other fingers  to
  4169. the right. Your bent fingers are pointing to the +X direction. Your thumb now
  4170. points +Y. Your index finger points +Z.
  4171.  
  4172. To use a right-handed coordinate system, as is popular in some  CAD  programs
  4173. and other ray tracers, make the same shape using your right hand. Your  thumb
  4174. still points up in the +Y  direction  and  your  index  finger  still  points
  4175. forward in the +Z direction but your other fingers now say the +X is  to  the
  4176. left. That means that the "right" side of  your  screen  is  now  in  the  -X
  4177. direction. To tell POV-Ray to act like this this you can  use  a  negative  X
  4178. value in the "right" vector like this:
  4179.  
  4180.   right <-1.33, 0, 0>
  4181.  
  4182.  
  4183. Since X increasing to the left doesn't make much sense on a  2D  screen,  you
  4184. now rotate the whole thing 180 degrees around by using a positive Z value  in
  4185. your camera's location. You end up with something like this.
  4186.  
  4187.   camera {
  4188.     location <0,0,10>
  4189.     up       <0,1,0>
  4190.     right    <-1.33,0,0>
  4191.     look_at  <0,0,0>
  4192.   }
  4193.  
  4194.  
  4195. Now when you do your ray tracer's aerobics, as explained in the section Scene
  4196. Basics "Rotate" , you use your right  hand  to  determine  the  direction  of
  4197. rotations.
  4198.  
  4199. In a 2 dimensional grid, X is always to the  right  and  Y  is  up.  The  two
  4200. versions of handedness arise from the question of whether Z points  into  the
  4201. screen or out of it, and which axis in your computer model relates to  up  in
  4202. the real world.
  4203.  
  4204. Architectural CAD  systems,  like  AutoCAD,  tend  to  use  the  "God's  Eye"
  4205. orientation that the Z axis is the elevation and is the model's up direction.
  4206. This approach makes sense if  you're  an  architect  looking  at  a  building
  4207. blueprint on a computer screen. Z means up, and  it  increases  towards  you,
  4208. with X and Y still across and up the screen. This is the basic  right  handed
  4209. system.
  4210.  
  4211. Stand alone rendering systems, like  POV-Ray,  tend  to  consider  you  as  a
  4212. participant. You're looking at the screen  as  if  you  were  a  photographer
  4213. standing in the scene. Up in the model is now Y, the same as up in  the  real
  4214. world, and X is still to the right, so Z must be depth, which increases  away
  4215. from you into the screen. This is the basic left handed system.
  4216.  
  4217. 3.4.4.5          Transforming the Camera
  4218.  
  4219. The "translate" and "rotate" commands can re-position the camera once  you've
  4220. defined it.
  4221.  
  4222. For example:
  4223.  
  4224.   camera {
  4225.     location  < 0,  0,  0>
  4226.     direction < 0,  0,  1>
  4227.     up        < 0,  1,  0>
  4228.     right     < 1,  0,  0>
  4229.     rotate    <30, 60, 30>
  4230.     translate < 5,  3,  4>
  4231.   }
  4232.  
  4233.  
  4234. In this example, the camera is created, then rotated by 30 degrees about  the
  4235. X axis, 60 degrees about the Y axis, and 30 degrees about the  Z  axis,  then
  4236. translated to another point in space.
  4237.  
  4238. 3.4.5            Camera Identifiers
  4239.  
  4240. You may declare several camera identifiers if you wish. This makes it easy to
  4241. quickly change cameras. For example:
  4242.  
  4243.   #declare Long_Lens =
  4244.     camera {
  4245.       location -z*100
  4246.       direction z*50
  4247.     }
  4248.  
  4249.   #declare Short_Lens =
  4250.     camera {
  4251.       location -z*50
  4252.       direction z*10
  4253.     }
  4254.  
  4255.   camera {
  4256.     Long_Lens    //edit this line to change lenses
  4257.     look_at Here
  4258.   }
  4259.  
  4260.  
  4261. 3.5              Objects
  4262.  
  4263. Objects are the building blocks of your scene. There are 20  different  types
  4264. of  objects  supported  by  POV-Ray.  Thirteen  of  them  are  finite  solid
  4265. primitives, 4 are finite patch primitives, 5 are  infinite  solid  polynomial
  4266. primitives, 3  are  types  of  Constructive  Solid  Geometry  and  one  is  a
  4267. specialized object that is a light source.
  4268.  
  4269. The basic syntax of an object is a keyword describing its type, some  floats,
  4270. vectors or other parameters which further define its  location  and/or  shape
  4271. and some optional object modifiers such as texture, pigment, normal,  finish,
  4272. bounding, clipping or transformations.
  4273.  
  4274. The texture describes what  the  object  looks  like,  i.  e.  its  material.
  4275. Textures are combinations of pigments, normals and finishes. Pigment  is  the
  4276. color or pattern of colors inherent in the material. Normal is  a  method  of
  4277. simulating various patterns of bumps, dents, ripples or  waves  by  modifying
  4278. the surface normal vector. Finish describes  the  reflective  and  refractive
  4279. properties of a material.
  4280.  
  4281. Bounding shapes are finite, invisible shapes which wrap around complex,  slow
  4282. rendering shapes in order to speed up rendering  time.  Clipping  shapes  are
  4283. used to cut away parts of shapes to expose a hollow interior. Transformations
  4284. tell the ray tracer how to move, size or rotate the shape and/or the  texture
  4285. in the scene.
  4286.  
  4287. 3.5.1            Finite Solid Primitives
  4288.  
  4289. There are 13 different  solid  finite  primitive  shapes:  blob,  box,  cone,
  4290. cylinder, fractal, height field, lathe, sphere,  superellipsoid,  surface  of
  4291. revolution, text object and torus. These have a well-defined "inside" and can
  4292. be used in CSG (see section "Constructive Solid Geometry" ). They are  finite
  4293. and respond to automatic bounding.
  4294.  
  4295. 3.5.1.1          Blob
  4296.  
  4297. A blob. Blobs are an interesting and  flexible  object  type.  Mathematically
  4298. they are iso-surfaces of scalar fields, i.e. their surface is defined by  the
  4299. strength of the field in each point. If this strength is equal to a threshold
  4300. value you're on the surface otherwise you're not.
  4301.  
  4302. Picture each blob component as an object floating in space.  This  object  is
  4303. "filled" with a field that has its maximum at the center of  the  object  and
  4304. drops off to zero at the object's surface. The field strength  of  all  those
  4305. components are added together to form the field  of  the  blob.  Now  POV-Ray
  4306. looks for points where this field has a given value, the  "threshold"  value.
  4307. All these points form the surface of the blob object. Points with  a  greater
  4308. field than the threshold value are considered to be inside while points  with
  4309. a smaller field are outside.
  4310.  
  4311. There's another, simpler way of looking at blobs. They can be seen as a union
  4312. of "flexible" components that attract or repel each other to form a  "blobby"
  4313. organic looking shape. The components' surfaces actually stretch out smoothly
  4314. and connect as if they were made of honey or something like that.
  4315.  
  4316. A blob is made up of spherical and cylindrical components and is  defined  as
  4317. follows:
  4318.  
  4319.   blob {
  4320.     threshold THRESHOLD_VALUE
  4321.     cylinder { <END1>, <END2>, RADIUS, [ strength ] STRENGTH }
  4322.     sphere { <CENTER>, RADIUS, [ strength ] STRENGTH }
  4323.     [ component STRENGTH, RADIUS, <CENTER> ]
  4324.     [ hierarchy FLAG ]
  4325.     [ sturm ]
  4326.   }
  4327.  
  4328.  
  4329. The threshold value is the total field strength value that POV-Ray is looking
  4330. for. By following the ray out  into  space  and  looking  at  how  each  blob
  4331. component affects the ray, POV-Ray will find the points in  space  where  the
  4332. field strength is equal to the threshold value. The following list shows some
  4333. things you should know about the threshold value.
  4334.  
  4335.   1) The threshold value must be positive.
  4336.   2) A component disappears if  the  threshold  value  is  greater  than  its
  4337.      strength.
  4338.   3) As the threshold value gets larger the surface you see  gets  closer  to
  4339.      the centers of the components.
  4340.   4) As the threshold value gets smaller, the surface you see gets closer  to
  4341.      the surface of the components.
  4342.  
  4343.  
  4344. Cylindrical components are specified  by  the  keyword  "cylinder"  giving  a
  4345. cylinder formed by the base <END1>, the apex  <END2>  and  the  radius.  This
  4346. cylinder has hemispherical caps at the base and  apex.  Spherical  components
  4347. are specified by the keyword "sphere" forming a sphere at <CENTER>  with  the
  4348. gives radius. Each component can be individually translated, rotated,  scaled
  4349. and  textured.  The  complete  syntax  for  the  cylindrical  and  spherical
  4350. components is:
  4351.  
  4352.   sphere { <CENTER>, RADIUS, [strength] STRENGTH
  4353.     [ translate <VECTOR> ]
  4354.     [ rotate <VECTOR> ]
  4355.     [ scale <VECTOR> ]
  4356.     TEXTURE_MODIFIERS
  4357.   }
  4358.  
  4359.   cylinder { <END1>, <END2>, RADIUS, [strength] STRENGTH
  4360.     [ translate <VECTOR> ]
  4361.     [ rotate <VECTOR> ]
  4362.     [ scale <VECTOR> ]
  4363.     TEXTURE_MODIFIERS
  4364.   }
  4365.  
  4366.  
  4367. By  unevenly  scaling  a  spherical  component  you  can  create  ellipsoidal
  4368. components. The component keyword gives a spherical  component  and  is  only
  4369. used for compatibility with earlier POV-Ray versions.
  4370.  
  4371. The "strength" parameter is a float value specifying the  field  strength  at
  4372. the center of the object.  The  strength  may  be  positive  or  negative.  A
  4373. positive value will make that component  attract  other  components  while  a
  4374. negative value will make it repel other components. Components in  different,
  4375. separate blob shapes do not affect each other.
  4376.  
  4377. You should keep the following things in mind.
  4378.  
  4379.   1) The strength value may be positive or negative. Zero is a bad value,  as
  4380.      the net result is that no field was added --- you  might  just  as  well
  4381.      have not used this component.
  4382.   2) If strength is positive, then POV-Ray will add the component's field  to
  4383.      the space around the center of the component. If this adds enough  field
  4384.      strength to be greater  than  the  "threshold"  value  you  will  see  a
  4385.      surface.
  4386.   3) If the strength value  is  negative,  then  POV-Ray  will  subtract  the
  4387.      component's field from the space around the  center  of  the  component.
  4388.      This will only do something if there happen to  be  positive  components
  4389.      nearby. What happens is that the  surface  around  any  nearby  positive
  4390.      components  will  be  dented  away  from  the  center  of  the  negative
  4391.      component.
  4392.  
  4393.  
  4394. The components of each blob object are  internally  bounded  by  a  spherical
  4395. bounding hierarchy to speed up blob intersection tests and other  operations.
  4396. By using the optional keyword "hierarchy" you can switch this hierarchy  off.
  4397.  
  4398.  
  4399. An example of a three component blob is:
  4400.  
  4401.   blob {
  4402.     threshold 0.6
  4403.     sphere { <.75, 0, 0>, 1, 1 }
  4404.     sphere { <-.375, .64952, 0>, 1, 1 }
  4405.     sphere { <-.375, -.64952, 0>, 1, 1 }
  4406.     scale 2
  4407.   }
  4408.  
  4409.  
  4410. If you have a single blob component then the surface you see will  just  look
  4411. like the object used, i.e. a sphere or a cylinder,  with  the  surface  being
  4412. somewhere inside the surface specified for the component. The  exact  surface
  4413. location can be determined from the blob  equation  listed  below  (you  will
  4414. probably never need to know this, blobs are more for visual appeal  than  for
  4415. exact modeling).
  4416.  
  4417. For the more mathematically minded, here's the  formula  used  internally  by
  4418. POV-Ray to create blobs. You don't need to understand this to use blobs.
  4419.  
  4420. The formula used for a single blob component is:
  4421.  
  4422.  
  4423.   density = strength * (1 - radius^2)^2
  4424.  
  4425.  
  4426. This formula has the nice property that it is exactly equal  to  STRENGTH  at
  4427. the center of the component and drops off to  exactly  0  at  a  distance  of
  4428. RADIUS from the center of the component. The density formula  for  more  than
  4429. one blob component is just the sum of the individual component densities:
  4430.  
  4431.   density = density1 + density2 + ...
  4432.  
  4433.  
  4434. Blobs can be used  in  CSG  shapes  and  they  can  be  scaled,  rotated  and
  4435. translated. Because they are finite they respond to automatic  bounding.  The
  4436. calculations  for  blobs  must  be  very  accurate.  If  this  shape  renders
  4437. improperly you may add the keyword "sturm" after the last  component  to  use
  4438. POV-Ray's slower-yet-more-accurate Sturmian root solver.
  4439.  
  4440. 3.5.1.2          Box
  4441.  
  4442. A box. A simple box can be defined by listing two corners  of  the  box  like
  4443. this:
  4444.  
  4445.   box {
  4446.     <CORNER1>, <CORNER2>
  4447.   }
  4448.  
  4449.  
  4450. Where <CORNER1> and <CORNER2> are vectors defining the x, y, z coordinates of
  4451. opposite corners of the box.
  4452.  
  4453. Note that all boxes are defined with their faces parallel to  the  coordinate
  4454. axes. They may later be rotated to any orientation using a rotate  parameter.
  4455.  
  4456.  
  4457. Each element of CORNER1 should always be less than the corresponding  element
  4458. in CORNER2. If any elements of CORNER1 are larger than CORNER2, the box  will
  4459. not appear in the scene.
  4460.  
  4461. Boxes are calculated efficiently and make good bounding shapes. Because  they
  4462. are finite they respond to automatic bounding. As with all shapes,  they  can
  4463. be translated, rotated and scaled.
  4464.  
  4465. 3.5.1.3          Cone
  4466.  
  4467. A cone. A finite length cone or a frustum (a cone with the point cut off) may
  4468. be defined by.
  4469.  
  4470.   cone {
  4471.     <END1>, RADIUS1, <END2>, RADIUS2
  4472.   }
  4473.  
  4474.  
  4475. Where <END1> and <END2> are vectors defining the x, y, z coordinates  of  the
  4476. center of each end of the cone and RADIUS1 and RADIUS2 are float  values  for
  4477. the radius of those ends.
  4478.  
  4479. Like a cylinder, normally the ends of a cone are closed by flat planes  which
  4480. are parallel to each other and perpendicular  to  the  length  of  the  cone.
  4481. Adding the optional keyword "open" after RADIUS2 will remove the end caps and
  4482. results in a tapered hollow tube like a megaphone or funnel.
  4483.  
  4484. Because they are finite they respond  to  automatic  bounding.  As  with  all
  4485. shapes, they can be translated, rotated and scaled.
  4486.  
  4487. 3.5.1.4          Cylinder
  4488.  
  4489. A cylinder. A finite length cylinder with parallel end caps  may  be  defined
  4490. by.
  4491.  
  4492.   cylinder {
  4493.     <END1>, <END2>, RADIUS
  4494.   }
  4495.  
  4496.  
  4497. Where <END1> and <END2> are vectors defining the x, y, z coordinates  of  the
  4498. center of each end of the cylinder and  RADIUS  is  a  float  value  for  the
  4499. radius.
  4500.  
  4501. Normally the ends of a cylinder are closed by flat planes which are  parallel
  4502. to each other and perpendicular to the length of  the  cylinder.  Adding  the
  4503. optional keyword "open" after the radius will remove the end caps and results
  4504. in a hollow tube.
  4505.  
  4506. Because they are finite they respond  to  automatic  bounding.  As  with  all
  4507. shapes, they can be translated, rotated and scaled.
  4508.  
  4509. 3.5.1.5          Height Field
  4510.  
  4511. A height field. Height fields are fast, efficient objects that are  generally
  4512. used to create  mountains  or  other  raised  surfaces  out  of  hundreds  of
  4513. triangles in a mesh. The height field syntax is:
  4514.  
  4515.   hfield {
  4516.     FILE_TYPE "FILENAME"
  4517.     [ hierarchy BOOL ]
  4518.     [ smooth BOOL ]
  4519.     [ water_level FLOAT ]
  4520.   }
  4521.  
  4522.  
  4523. A height field is essentially a one unit wide by one unit long square with  a
  4524. mountainous surface on top. The height of the mountain at each point is taken
  4525. from the color number or palette index of the pixels in a graphic image file.
  4526. The maximum height is one. That corresponds to the maximum possible color  or
  4527. palette index value in the image file.
  4528.  
  4529.         ________  <---- image index 255 (or 65535 for 16-bit images)
  4530.       /        /|
  4531. +1y  ---------- |
  4532.      |        | |
  4533.      |        | |+1z <- Image upper-right
  4534.      |        | /
  4535. 0,0,0---------- +1x
  4536.      ^
  4537.      |____ Image lower-left
  4538. The size and orientation of an un-scaled height field.
  4539.  
  4540. The mesh of triangles corresponds directly to the pixels in the  image  file.
  4541. Each square formed by four neighboring pixels is divided into two  triangles.
  4542. An image with a resolution of NxM pixels has  (N-1)x(M-1)  squares  that  are
  4543. divided into 2x(N-1)x(M-1) triangles.
  4544.  
  4545. The resolution of  the  height  field  is  influenced  by  two  factors:  the
  4546. resolution of the image and the resolution of  the  color/index  values.  The
  4547. size of the image determines the resolution in  the  x-  and  z-direction.  A
  4548. larger image uses more triangles and looks smoother. The  resolution  of  the
  4549. color/index value determines the resolution along the y-axis. A height  field
  4550. made from an 8 bit image can have 256 different height levels while one  made
  4551. from a 16 bit image can have up to 65536 different height  levels.  Thus  the
  4552. second height field will look much smoother in the y-direction if the  height
  4553. field is created appropriately.
  4554.  
  4555. The size/resolution of the image does not  affect  the  size  of  the  height
  4556. field. The un-scaled height field size will always be 1x1. Higher  resolution
  4557. image files will create smaller triangles, not larger height fields.
  4558.  
  4559. There  are  six  or  possibly  seven  types  of  files  which  can  define  a
  4560. heightfield, as follows:
  4561.  
  4562.   height_field { gif "filename.gif" }
  4563.   height_field { pgm "filename.pgm" }
  4564.   height_field { png "filename.png" }
  4565.   height_field { pot "filename.pot" }
  4566.   height_field { ppm "filename.ppm" }
  4567.   height_field { sys "filename.???" }
  4568.   height_field { tga "filename.tga" }
  4569.  
  4570.  
  4571. The image file used to create a height field can be a  GIF,  TGA,  POT,  PNG,
  4572. PGM, PPM, and possibly a system specific  (Windows  BMP  or  Macintosh  Pict)
  4573. format file. The GIF, PNG, PGM, and possibly system format files are the only
  4574. ones that can be created using a standard paint  program.  Though  there  are
  4575. paint programs for creating TGA image files they won't be  of  much  use  for
  4576. creating the special 16  bit  TGA  files  used  by  POV-Ray  (see  below  and
  4577. "HF_Gray_16" for more details).
  4578.  
  4579. In an image file like GIF that uses a color palette the color number  is  the
  4580. palette index at a given pixel. Use a paint program to look at the palette of
  4581. a GIF image. The first color is palette index zero, the second is index  one,
  4582. the third is index two, and so on. The  last  palette  entry  is  index  255.
  4583. Portions of the image that use low palette entries will result in lower parts
  4584. of the height field. Portions of the image that use  higher  palette  entries
  4585. will result in higher parts of the height field.
  4586.  
  4587. Height fields created from GIF files  can  only  have  256  different  height
  4588. levels because the maximum number of colors in a GIF file is 256.
  4589.  
  4590. The color of the palette entry does not affect the height of the pixel. Color
  4591. entry 0 could be red, blue, black, or orange, but the  height  of  any  pixel
  4592. that uses color entry 0 will always be 0. Color entry 255  could  be  indigo,
  4593. hot pink, white, or sky blue, but the height of any  pixel  that  uses  color
  4594. entry 255 will always be 1.
  4595.  
  4596. You can create height field GIF images with a  paint  program  or  a  fractal
  4597. program like "Fractint". You can usually get Fractint from most of  the  same
  4598. sources as POV-Ray.
  4599.  
  4600. A POT file is essentially a GIF file with  a  16  bit  palette.  The  maximum
  4601. number of colors in a POT file is 65536. This means a POT  height  field  can
  4602. have up to 65536 possible height values. This makes it possible to have  much
  4603. smoother height fields. Note that the maximum height of the field is still  1
  4604. even though more intermediate values are possible.
  4605.  
  4606. At the time of this writing, the only program that created POT  files  was  a
  4607. freeware IBM-PC program  called  Fractint.  POT  files  generated  with  this
  4608. fractal program create fantastic landscapes.
  4609.  
  4610. The TGA and PPM file formats may be used as  a  storage  device  for  16  bit
  4611. numbers rather than an image file. These formats use the red and green  bytes
  4612. of each pixel to store the high and low bytes of a height value. These  files
  4613. are as smooth  as  POT  files,  but  they  must  be  generated  with  special
  4614. custom-made programs. Several programs can create  TGA  heightfields  in  the
  4615. format POV uses, such as "gforge", and "Terrain Maker".
  4616.  
  4617. PNG format heightfields are usually stored in the form of a grayscale  image,
  4618. with black corresponding to lower and white to higher  parts  of  the  height
  4619. field. Because PNG files can store up to 16 bits in  grayscale  images,  they
  4620. will be as smooth as TGA and PPM images. Since they are grayscale images, you
  4621. will be able to view them with a regular  image  viewer.  Gforge  can  create
  4622. 16-bit heightfields in PNG format. Color PNG images will be used in the  same
  4623. way as TGA and PPM images.
  4624.  
  4625. SYS format is a platform specific file format.  See  your  platform  specific
  4626. documentation for details.
  4627.  
  4628. An optional "water_level" parameter may be added  after  the  file  name.  It
  4629. consists of the keyword "water_level" followed by a float value  telling  the
  4630. program to ignore parts of the height field below  that  value.  The  default
  4631. value is zero, and legal values  are  between  zero  and  one.  For  example,
  4632. "water_level .5" tells POV-Ray to only render the  top  half  of  the  height
  4633. field. The other half is "below the water" and couldn't be seen anyway.  This
  4634. term comes from the popular use of height  fields  to  render  landscapes.  A
  4635. height field would be used to create islands and another shape would be  used
  4636. to
  4637. simulate water around the islands. A large portion of the height field  would
  4638. be obscured by the "water" so the "water_level" parameter was  introduced  to
  4639. allow the ray-tracer  to  ignore  the  unseen  parts  of  the  height  field.
  4640. Water_level is also used to "cut away" unwanted  lower  values  in  a  height
  4641. field. For example, if you have an image of a  fractal  on  a  solid  colored
  4642. background, where the background color is palette entry 0, you can remove the
  4643. background in the height field by specifying, "water_level .001"
  4644.  
  4645. Normally height fields have a rough, jagged look because  they  are  made  of
  4646. lots of flat triangles. Adding the keyword "smooth" causes POV-Ray to  modify
  4647. the surface normal vectors of the triangles in such a way that  the  lighting
  4648. and shading of the triangles will give a smooth look. This may allow  you  to
  4649. use a lower resolution file for your height field  than  would  otherwise  be
  4650. needed. However, smooth triangles will take longer to render.
  4651.  
  4652. In order to speed up the intersection tests an one-level  bounding  hierarchy
  4653. is available. By default it is always used but it  can  be  switched  off  to
  4654. eventually imrpove the rendering speed for  small  height  fields  (i.e.  low
  4655. resolution images).
  4656.  
  4657. Height fields can be used in CSG shapes and they can be scaled,  rotated  and
  4658. translated. Because they are finite they respond to automatic bounding.
  4659.  
  4660. 3.5.1.6          Julia Fractal
  4661.  
  4662. A julia fractal.
  4663.  
  4664. A julia fractal object is a 3-D slice of a 4-D object created by generalizing
  4665. the process used to create the classic  Julia  sets.  You  can  make  a  wide
  4666. variety of strange objects using julia_fractal, including some that look like
  4667. bizarre blobs of twisted taffy.
  4668.  
  4669. The julia_fractal syntax (with default values listed in comments) is:
  4670.  
  4671.   julia_fractal {
  4672.     4DJULIA_PARAMETER                 // default is <1,0,0,0>
  4673.     [ quaternion | hypercomplex ]     // default is quaternion
  4674.     [ sqr | cube | exp |
  4675.       reciprocal | sin | asin |
  4676.       sinh | asinh | cos | acos |
  4677.       cosh | acosh | tan | atan |
  4678.       tanh | atanh | log | pwr(X,Y) ] // default is sqr
  4679.     [ max_iteration MAX_ITERATION ]   // default value 20
  4680.     [ precision PRECISION ]           // default value 20
  4681.     [ slice 4DNORMAL, DISTANCE ]      // default <0,0,0,1>,0
  4682.   }
  4683.  
  4684.  
  4685. The 4-D vector 4DJULIA_PARAMETER is the classic  Julia  parameter  p  in  the
  4686. iterated formula f(h) + p.
  4687.  
  4688. The julia_fractal object is calculated by using an algorithm that  determines
  4689. whether an arbitrary point h(0) in 4-D space is inside or outside the object.
  4690. The algorithm requires generating the sequence of vectors h(0), h(1), ...  by
  4691. iterating the formula
  4692.  
  4693.   h(n+1) = f(h(n)) + p (n = 0, 1, ..., max_iteration-1)
  4694.  
  4695.  
  4696. where p is the fixed 4-D vector parameter of julia_fractal, and f() is one of
  4697. the functions sqr, cube, ... specified by the presence of  the  corresponding
  4698. keyword. The point h(0) that begins the sequence  is  considered  inside  the
  4699. julia_fractal object if none  of  the  vectors  in  the  sequence  escapes  a
  4700. hypersphere of radius 4 about the origin before the iteration number  reaches
  4701. the max_iteration value. As  you  increase  the  max_iteration,  some  points
  4702. escape that did not previously escape, making the julia_fractal. Depending on
  4703. the JULIA_PARAMETER, the julia_fractal object is not  necessarily  connected;
  4704. it may be scattered fractal  "dust".  Using  a  low  max_iteration  can  fuse
  4705. together the dust to make a  solid  object.  A  high  max_iteration  is  more
  4706. accurate but slows rendering. Even though  it  is  not  accurate,  the  solid
  4707. shapes you get with a low_maximum iteration value can be quite interesting.
  4708.  
  4709. Since   the   mathematical   object   described   by   this   algorithm   is
  4710. four-dimensional, and POV-Ray renders three dimensional objects,  there  must
  4711. be a way to  reduce  the  number  of  dimensions  of  the  object  from  four
  4712. dimensions to three. This is accomplished by  intersecting  the  4-D  fractal
  4713. with a 3-D "plane" defined  by  the  slice  filed  and  then  projecting  the
  4714. intersection to 3-D  space.  The  slice  plane  is  the  3-D  space  that  is
  4715. perpendicular to NORMAL4D and is DISTANCE units from the origin. Zero  length
  4716. NORMAL4D vectors, or a NORMAL4D vector  with  a  zero  fourth  component  are
  4717. illegal.
  4718.  
  4719. You can get a good feel for the four dimensional nature of a julia_fractal by
  4720. using POV-Ray's animation feature to vary slice's DISTANCE parameter. You can
  4721. make the julia_fractal appear from nothing, grow, then shrink to  nothing  as
  4722. DISTANCE changes, much as the cross section of a 3-D  object  changes  as  it
  4723. passes through a plane.
  4724.  
  4725. The precision parameter is a tolerance used in the determination  of  whether
  4726. points are inside or outside the fractal  object.  Larger  values  give  more
  4727. accurate results but slower rendering. Use as low a value as you can  without
  4728. visibly degrading the fractal object's appearance.
  4729.  
  4730. The presence of the keywords quaternion or hypercomplex determine  which  4-D
  4731. algebra is used to calculate the fractal. Both are 4-D generalizations of the
  4732. complex numbers but neither satisfies  all  the  field  properties  (all  the
  4733. properties of real and complex numbers that many of us slept through in  high
  4734. school.) Quaternions have non-commutative  multiplication,  and  hypercomplex
  4735. numbers can fail to have a multiplicative inverse for some non-zero elements.
  4736. (It has been proved that you cannot successfully generalize  complex  numbers
  4737. to four dimensions with all the field properties intact, so something has  to
  4738. break.) Both of these algebras were discovered in the 19th  century.  Of  the
  4739. two,  the  quaternions  are  much  better  known,  but  one  can  argue  that
  4740. hypercomplex numbers are more useful for our purposes, since  complex  valued
  4741. functions such as sin, cos, etc. can be generalized to work for  hypercomplex
  4742. numbers in a uniform way.
  4743.  
  4744. For the  mathematically  curious,  the  algebraic  properties  of  these  two
  4745. algebras can be derived from the multiplication properties of the unit  basis
  4746. vectors 1 = <1,0,0,0>, i=<0,1,0,0>, j=<0,0,1,0>,  and  k=<0,0,0,1>.  In  both
  4747. algebras 1x = x1 = x for any x (1 is the multiplicative identity). The  basis
  4748. vectors 1 and i behave exactly like the familiar complex numbers 1 and  i  in
  4749. both algebras.
  4750.  
  4751. Quaternion basis vector multiplication rules:
  4752.  
  4753.   ij = k;            jk  = i;   ki = j
  4754.   ji = -k;           kj  = -i;  ik = -j
  4755.   ii = jj = kk = -1; ijk = -1;
  4756.  
  4757.  
  4758. Hypercomplex basis vector multiplication rules:
  4759.  
  4760.   ij = k;            jk = -i;   ki = -j
  4761.   ji = k;            kj = -i;   ik = -j
  4762.   ii = jj = kk = -1; ijk = 1;
  4763.  
  4764.  
  4765. A distance estimation calculation is used with the quaternion calculations to
  4766. speed them up. The proof that this distance estimation formula works does not
  4767. generalize from two to four dimensions, but the formula seems  to  work  well
  4768. anyway, the absence of proof notwithstanding!
  4769.  
  4770. The presence of one of the function keywords sqr, cube, etc. determine  which
  4771. function is used for f(h) in the iteration formula h(n+1) = f(h(n)) + p. Most
  4772. of the function keywords work only if the hypercomplex  keyword  is  present;
  4773. only sqr and cube work with  quaternions.  The  functions  are  all  familiar
  4774. complex functions generalized to four dimensions.
  4775.  
  4776.   Function Keyword    Maps 4-D value h to:
  4777. ================================================
  4778.   sqr                 h*h
  4779.   cube                h*h*h
  4780.   exp                 e raised to the power h
  4781.   reciprocal          1/h
  4782.   sin                 sine of h
  4783.   asin                arcsine of h
  4784.   sinh                hyperbolic sine of h
  4785.   asinh               inverse hyperbolic sine of h
  4786.   cos                 cosine of h
  4787.  
  4788.   acos                arccosine of h
  4789.   cosh                hyperbolic cos of h
  4790.   acosh               inverse hyperbolic cosine of h
  4791.   tan                 tangent of h
  4792.   atan                arctangent of h
  4793.   tanh                hyperbolic tangent of h
  4794.   atanh               inverse hyperbolic tangent of h
  4795.   log                 natural logarithm of h
  4796.   pwr(x,y)            h raised to the complex power x+iy
  4797.  
  4798.  
  4799. The first renderings of julia fractals using quaternions were  done  by  Alan
  4800. Norton and later by John Hart in the '80's. This new  POV-Ray  implementation
  4801. follows Fractint in pushing beyond what is known in the literature  by  using
  4802. hypercomplex numbers and by generalizing  the  iterating  formula  to  use  a
  4803. variety of transcendental functions instead of just  the  classic  Mandelbrot
  4804. "z^2 + c" formula. With an extra two dimensions  and  eighteen  functions  to
  4805. work with, intrepid explorers should be  able  to  locate  some  new  fractal
  4806. beasties in hyperspace, so have at it!
  4807.  
  4808. 3.5.1.7          Lathe
  4809.  
  4810. A lathe. The lathe is an object generated  from  rotating  a  two-dimensional
  4811. curve about an axis. This curve is defined by  a  set  of  points  which  are
  4812. connected by linear, quadratic or cubic spline curves. The syntax is:
  4813.  
  4814.   lathe {
  4815.     [ linear_spline | quadratic_spline | cubic_spline ]
  4816.     NUMBER_OF_POINTS,
  4817.     <POINT_1>, <POINT_2>, ..., <POINT_n>
  4818.   }
  4819.  
  4820.  
  4821. The parameter NUMBER_OF_POINTS determines how many two-dimensional points are
  4822. forming the curve. These points are connected by linear, quadratic  or  cubic
  4823. splines as specified by an optional keyword (the default  is  linear_spline).
  4824. Since the curve is not automatically closed, i.e. the first and  last  points
  4825. are not automatically connected, you'll have to do this by your  own  if  you
  4826. want a closed curve. The curve thus defined is rotated about  the  y-axis  to
  4827. form the lathe object which is centered at the origin.
  4828.  
  4829. The following examples creates a  simple  lathe  object  that  looks  like  a
  4830. "thick" cylinder, i.e. a cylinder with a thick wall:
  4831.  
  4832.   lathe {
  4833.     linear_spline
  4834.     5,
  4835.     <2, 0>, <3, 0>, <3, 5>, <2, 5>, <2, 0>
  4836.     pigment {Red}
  4837.   }
  4838.  
  4839.  
  4840. The cylinder has an inner radius of 2 and an outer radius of 3, giving a wall
  4841. width of 1. It's height is 5 and it's located at the origin pointing up, i.e.
  4842. the rotation axis is the y-axis. Note that the first and last point are equal
  4843. to get a closed curve.
  4844.  
  4845. The splines that are used by the lathe and prism objects  are  a  little  bit
  4846. difficult to understand. The basic concept of splines  is  to  draw  a  curve
  4847. through a given set of points in a determined way. The linear spline  is  the
  4848. simplest spline because it's nothing more than connecting consecutive  points
  4849. with a line. This means that the curve that is drawn between two points  only
  4850. depends on those two points. No additional information is taken into account.
  4851. Quadratic and cubic splines are different in that they do not only take other
  4852. points into account when connecting two points but they  also  look  smoother
  4853. and - in the case of the cubic spline - produce smoother transitions at  each
  4854. point.
  4855.  
  4856. Quadratic splines are made of quadratic curves. Each  of  them  connects  two
  4857. consecutive points. Since those two points (call them second and third point)
  4858. aren't enough to describe a quadratic curve  the  predecessor  of  the  third
  4859. point is taken into account when  the  curve  is  drawn.  Mathematically  the
  4860. relationship (their location on the 2-D plane) between the third  and  fourth
  4861. point determines the slope of the curve at the third point. The slope of  the
  4862. curve at the second point is out of control. Thus quadratic splines look much
  4863. "smoother" than  linear  splines  but  the  transitions  at  each  point  are
  4864. generally not smooth because the slopes on "both  sides"  of  the  point  are
  4865. different.
  4866.  
  4867. Cubic splines overcome the transition problem of  quadratic  splines  because
  4868. they also take the first point into account when drawing  the  curve  between
  4869. the second and third point. The slope at the second point  is  under  control
  4870. now and allows a smooth transition at each point. Thus cubic splines  produce
  4871. the most flexible and smooth curves.
  4872.  
  4873. You should note that the number of spline segments, i.e. curves  between  two
  4874. points, depends on the spline type used.  For  linear  splines  you  get  n-1
  4875. segments connecting the points P[i], i=1...n. A quadratic  spline  gives  you
  4876. n-2 segments because the last point is only used for determining the slope as
  4877. explained above (thus you'll need at least three points to define a quadratic
  4878. spline). The same holds for cubic splines where you get n-3 segments with the
  4879. first and last point used only for slope calculations (thus needing at  least
  4880. four points).
  4881.  
  4882. If you  want  to  get  a  closed  quadratic  and  cubic  spline  with  smooth
  4883. transitions at the end points you have to make sure that in  the  cubic  case
  4884. P[n-1] = P[2] (to get a closed curve), P[n] = P[3]  and  P[n-2]  =  P[1]  (to
  4885. smooth the transition). In the quadratic case P[n-1] =  P[1]  (to  close  the
  4886. curve) and P[n] = P[2].
  4887.  
  4888. Lathe objects respond to automatic bounding and can  be  translated,  rotated
  4889. and scaled.
  4890.  
  4891. 3.5.1.8          Prism
  4892.  
  4893. A prism. The prism is an object generated from  sweeping  a  two-dimensional,
  4894. closed curve along an axis. This curve is defined by a set  of  points  which
  4895. are connected by linear, quadratic or cubic splines. The syntax is:
  4896.  
  4897.   prism {
  4898.     [ linear_sweep | conic_sweep ]
  4899.     [ linear_spline | quadratic_spline | cubic_spline ]
  4900.     HEIGHT1,
  4901.     HEIGHT2,
  4902.     NUMBER_OF_POINTS,
  4903.     <POINT_1>, <POINT_2>, ..., <POINT_n>
  4904.     [ open ]
  4905.     [ sturm ]
  4906.   }
  4907.  
  4908.  
  4909. The parameter NUMBER_OF_POINTS determines how many two-dimensional points are
  4910. forming the curve. These points,  which  are  given  in  the  x-z-plane,  are
  4911. connected by linear, quadratic or cubic splines as specified by  an  optional
  4912. keyword (the default is linear spline) to get a closed  curve.  It  is  swept
  4913. along the y-axis from HEIGHT1 to HEIGHT2 to form the prism object. By default
  4914. linear sweeping is used to create the  prism,  i.e.  the  prism's  walls  are
  4915. perpendicular to the x-z-plane (the size of the curve doesn't  change  during
  4916. the sweep). You can also use conic  sweeping  that  leads  to  a  prism  with
  4917. "cone-like" walls by scaling the curve down during the sweep.
  4918.  
  4919. Like cylinders the prism is normally closed. You can remove the caps  on  the
  4920. prism by using the "open" keyword. If you do so you shouldn't use it with CSG
  4921. because the results may get wrong.
  4922.  
  4923. The following example creates a simple prism object that looks like  a  piece
  4924. of cake:
  4925.  
  4926.   prism {
  4927.     linear_sweep
  4928.     linear_spline
  4929.     0, 1,
  4930.     3,
  4931.     <-1, 0>, <1, 0>, <0, 5>
  4932.     pigment {Red}
  4933.   }
  4934.  
  4935.  
  4936. For an explanation of the spline concept read the description  of  the  lathe
  4937. object.
  4938.  
  4939. Prism objects respond to automatic bounding and can  be  translated,  rotated
  4940. and scaled.
  4941.  
  4942. 3.5.1.9          Sphere
  4943.  
  4944. A sphere. The syntax of the sphere object is:
  4945.  
  4946.   sphere {
  4947.     <CENTER>, RADIUS
  4948.   }
  4949.  
  4950.  
  4951. Where <CENTER> is a vector specifying the x, y, z coordinates of  the  center
  4952. of the sphere and RADIUS is a float value specifying the radius. Spheres  may
  4953. be scaled unevenly giving an ellipsoid shape.
  4954.  
  4955. Because spheres are highly optimized they make good bounding shapes.  Because
  4956. they are finite they respond to automatic bounding. As with all shapes,  they
  4957. can be translated, rotated and scaled.
  4958.  
  4959. 3.5.1.10         Superquadric Ellipsoid
  4960.  
  4961. A superquadric ellipsoid. The superquadric ellipsoid is an extension  of  the
  4962. quadric ellipsoid. It can be used to create boxes and  cylinders  with  round
  4963. edges and other  interesting  shapes.  Mathematically  it  is  given  by  the
  4964. equation:
  4965.  
  4966.   f(x, y, z) = (|x|^(2/e) + |y|^(2/e)) ^ (e/n) + |z|^(2/n) - 1 = 0
  4967.  
  4968.  
  4969. The values of e  and  n,  called  the  east-west  and  north-south  exponent,
  4970. determine the shape of the superquadric ellipsoid. Both have  to  be  greater
  4971. than zero. The sphere is e.g. given by e = 1 and n = 1.
  4972.  
  4973. The syntax of the superquadric ellipsoid is:
  4974.  
  4975.   superellipsoid { <e, n> }
  4976.  
  4977.  
  4978. The object is located at the origin and can be translated, rotated and scaled
  4979. just like any other object. Since it  is  finite  it  responds  to  automatic
  4980. bounding.
  4981.  
  4982. Two useful objects are the rounded box and the rounded  cylinder.  These  are
  4983. declared in the following way.
  4984.  
  4985.   #declare Rounded_Box = superellipsoid { <r, r> }
  4986.   #declare Rounded_Cylinder = superellipsoid { <1, r> }
  4987.  
  4988.  
  4989. The roundedness r determines the roundedness of  the  edges  and  has  to  be
  4990. greater than zero and smaller than one. The smaller you choose the values  of
  4991. r the smaller and sharper the edges will get.
  4992.  
  4993.  
  4994. 3.5.1.11         Surface of Revolution
  4995.  
  4996. A surface of revolution. The surface of revolution (SOR) object is  generated
  4997. by rotating a line about  an  axis.  This  line  is  essentially  a  function
  4998. describing the dependence of the radius from the  position  on  the  rotation
  4999. axis.
  5000.  
  5001. The syntax of the SOR object is:
  5002.  
  5003.   sor {
  5004.     NUMBER_OF_POINTS,
  5005.     <POINT1>, <POINT2>, ..., <POINTn>
  5006.     [ open ]
  5007.   }
  5008.  
  5009.  
  5010. The points <POINT1> through <POINTn> are two dimensional  vectors  consisting
  5011. of the radius and the corresponding position  on  the  rotation  axis.  These
  5012. points are smoothly connected and rotated about the y-axis to  form  the  SOR
  5013. object. The first and last points are only used to determine  the  slopes  of
  5014. the function at the start and end point. The function used for the SOR object
  5015. is similar to the splines used for the lathe object. The difference  is  that
  5016. the SOR object is less flexible because it underlies the restrictions of  any
  5017. mathematical function, i.e. to  any  given  point  y  on  the  rotation  axis
  5018. corresponds at most one radius. You can't rotate closed curves with  the  SOR
  5019. object.
  5020.  
  5021. The optional keyword "open" allows you to remove the caps on the SOR  object.
  5022. If you do this you shouldn't use it with CSG anymore because the results  may
  5023. be wrong.
  5024.  
  5025. The SOR object is useful for creating bottles, vases, and things like that. A
  5026. simple vase could look like this:
  5027.  
  5028.   #declare Vase = sor {
  5029.     7,
  5030.     <0.000000, 0.000000>
  5031.     <0.118143, 0.000000>
  5032.     <0.620253, 0.540084>
  5033.     <0.210970, 0.827004>
  5034.     <0.194093, 0.962025>
  5035.     <0.286920, 1.000000>
  5036.     <0.468354, 1.033755>
  5037.     open
  5038.   }
  5039.  
  5040.  
  5041. One might ask why there is any need for a SOR object if there  is  already  a
  5042. lathe object which is much more flexible. The reason  is  quite  simple.  The
  5043. intersection test with a SOR object involves solving of  a  cubic  polynomial
  5044. while the test  with  a  lathe  object  requires  solution  of  a  6th  order
  5045. polynomial (you need a cubic spline for the same  "smoothness").  Since  most
  5046. SOR and lathe objects will have several  segments  this  will  make  a  great
  5047. difference in speed. The roots of the 3rd order polynomial will also be  more
  5048. accurate and easier to find.
  5049.  
  5050. Surface of revolution objects  respond  to  automatic  bounding  and  can  be
  5051. translated, rotated and scaled.
  5052.  
  5053. 3.5.1.12         Text
  5054.  
  5055. A text object. A text object creates 3-D text as an  extruded  block  letter.
  5056. Currently only TrueType fonts are supported but the syntax allows  for  other
  5057. font types to be added in the future. The syntax is:
  5058.  
  5059.   text {
  5060.     ttf "FONTNAME.TTF",
  5061.     "STRING_OF_TEXT",
  5062.     THICKNESS_FLOAT, OFFSET_VECTOR
  5063.   }
  5064.  
  5065.  
  5066. Where FONTNAME.TTF is the name of the TrueType font  file.  It  is  a  quoted
  5067. string literal or string expression. The string expression which  follows  is
  5068. the actual text of the string object. It too may be a quoted  string  literal
  5069. or string expression. See "Strings" for more on string expressions.
  5070.  
  5071. The text will start with the origin at the lower, left, front  of  the  first
  5072. character and will extend in the +x  direction.  The  baseline  of  the  text
  5073. follows the x-axis and decenders drop into the -y direction. The front of the
  5074. character sits in the X-Y plane and the text is extruded in the +z direction.
  5075. The  front-to-back  thickness   is   specified   by   the   required   value
  5076. THICKNESS_FLOAT.
  5077.  
  5078. Characters are generally sized so that 1 unit of vertical spacing is correct.
  5079. The characters are about 0.5 to 0.75 units tall.
  5080.  
  5081. The horizontal spacing is handled by POV-Ray internally including any kerning
  5082. information stored in the font. The required vector OFFSET_VECTOR defines any
  5083. extra translation between each character. Normally you should specify a  zero
  5084. for this value. Specifing 0.1*x would  put  additional  0.1  units  of  space
  5085. between each character.
  5086.  
  5087. Only printable characters are allowed in text  objects.  Characters  such  as
  5088. return, line feed, tabs, backspace etc. are not supported.
  5089.  
  5090. 3.5.1.13         Torus
  5091.  
  5092. A torus. A torus is a 4th order quartic polynomial shape that  looks  like  a
  5093. donut or inner tube. Because  this  shape  is  so  useful  and  quartics  are
  5094. difficult to define, POV-Ray lets you take a short-cut and define a torus by:
  5095.  
  5096.  
  5097.   torus {
  5098.     MAJOR, MINOR
  5099.     [ sturm ]
  5100.   }
  5101.  
  5102.  
  5103. where MAJOR is a float value giving the major radius and  MINOR  is  a  float
  5104. specifying the minor radius. The major radius extends from the center of  the
  5105. hole to the mid-line of the rim while the minor radius is the radius  of  the
  5106. cross-section of the rim. The torus is centered at the origin and lies in the
  5107. X-Z plane with the Y-axis sticking through the hole.
  5108.  
  5109.    ----------- - - - - - - - ----------              +Y
  5110.   /          \              /          \              |
  5111.  /            \            /            \             |
  5112. |              |          |       |<-B-->|       -X---|---+X
  5113.  \            /            \            /             |
  5114.   \__________/_ _ _ _ _ _ _ \__________/              |
  5115.                     |<-----A----->|                  -Y
  5116.  
  5117.  A = Major Radius
  5118.  B = Minor Radius
  5119. Major & Minor Radius.
  5120.  
  5121. The torus is internally bounded by two cylinders  and  two  rings  forming  a
  5122. "thick" cylinder. With this bounding cylinder the performance  of  the  torus
  5123. intersection  test  is  vastly  increased.  The  test  for  a  valid   torus
  5124. intersection, i.e. solving a 4th order polynomial, is only performed  if  the
  5125. bounding cylinder is hit. Thus a lot of slow root  solving  calculations  are
  5126. avoided.
  5127.  
  5128. Calculations for all higher order polynomials must be very accurate.  If  the
  5129. torus renders improperly you may add the  keyword  "sturm"  after  the  MINOR
  5130. value to use POV-Ray's slower-yet-more-accurate Sturmian root solver.
  5131.  
  5132.  
  5133. 3.5.2            Finite Patch Primitives
  5134.  
  5135. There are 6 totally thin, finite objects which have no  well-defined  inside.
  5136. They may be combined in CSG union but cannot be use in other  types  of  CSG.
  5137. They are bicubic patch, disc, smooth triangle, triangle, polygon,  and  mesh.
  5138. Because these types are finite, POV-Ray can use automatic bounding on them to
  5139. speed up rendering time.
  5140.  
  5141. 3.5.2.1          Bicubic patch
  5142.  
  5143. A teapot made of bezier patches. A bicubic  patch  is  a  3D  curved  surface
  5144. created from a mesh of triangles. POV-Ray supports a type  of  bicubic  patch
  5145. called a Bezier patch. A bicubic patch is defined as follows:
  5146.  
  5147.   bicubic_patch {
  5148.     type PATCH_TYPE
  5149.     flatness FLATNESS_VALUE
  5150.     u_steps NUM_U_STEPS
  5151.     v_steps NUM_V_STEPS
  5152.     <CP1>,  <CP2>,   <CP3>,   <CP4>,
  5153.     <CP5>,  <CP6>,   <CP7>,   <CP8>,
  5154.     <CP9>,  <CP10>,  <CP11>,  <CP12>,
  5155.     <CP13>, <CP14>,  <CP15>,  <CP16>
  5156.   }
  5157.  
  5158.  
  5159. The keyword "type" is followed by a float PATCH_TYPE which currently must  be
  5160. either 0 or 1. For type  0  only  the  control  points  are  retained  within
  5161. POV-Ray. This means that a minimal amount of memory is  needed,  but  POV-Ray
  5162. will need to perform many extra calculations when trying to render the patch.
  5163. Type 1 preprocesses the  patch  into  many  subpatches.  This  results  in  a
  5164. significant speedup in rendering, at the cost of memory.
  5165.  
  5166. These four parameters: type, flatness, u_steps & v_steps, may appear  in  any
  5167. order. They are followed by 16 vectors that define the x, y, z coordinates of
  5168. the 16 control points which define the patch.  The  patch  touches  the  four
  5169. corner points <CP1>, <CP4>, <CP13> and <CP16> while the other 12 points  pull
  5170. and stretch the patch into shape.
  5171.  
  5172. The keywords "u_steps" and "v_steps" are each followed by float values  which
  5173. tell how many rows and columns of triangles are the minimum to use to  create
  5174. the surface. The maximum number of individual pieces of the  patch  that  are
  5175. tested by POV-Ray can be calculated from the following:
  5176.  
  5177.   sub-pieces = 2^u_steps * 2^v_steps
  5178.  
  5179.  
  5180. This means that you really should keep "u_steps" and  "v_steps"  under  4  or
  5181. Most patches  look  just  fine  with  "u_steps  3"  and  "v_steps  3",  which
  5182. translates to 64 subpatches (128 smooth triangles).
  5183.  
  5184. As POV-Ray processes the Bezier patch, it makes a test of the  current  piece
  5185. of the patch to see if it is flat enough to just pretend it is  a  rectangle.
  5186. The statement that controls this test is: "flatness  xxx".  Typical  flatness
  5187. values range from 0 to 1 (the lower the slower).
  5188.  
  5189. If the value for flatness is 0, then POV-Ray will always subdivide the  patch
  5190. to the extend specified by u_steps and v_steps. If flatness is  greater  than
  5191. 0, then every time the patch is split, POV-Ray will check to see if there  is
  5192. any need to split further.
  5193.  
  5194. There are both advantages and disadvantages to using a non-zero flatness. The
  5195. advantages include:
  5196.  
  5197.   - If the patch isn't very curved, then this will be  detected  and  POV-Ray
  5198.     won't waste a lot of time looking at the wrong pieces.
  5199.   - If the patch is only highly curved in a couple of  places,  POV-Ray  will
  5200.     keep subdividing there and concentrate it's efforts on the hard part.
  5201.  
  5202.  
  5203. The biggest disadvantage is that if POV-Ray stops subdividing at a particular
  5204. level on one part of the patch and at a different level on an  adjacent  part
  5205. of the patch, there is  the  potential  for  "cracking".  This  is  typically
  5206. visible as spots within the patch where you can see  through.  How  bad  this
  5207. appears depends very highly on the angle at which you are viewing the  patch.
  5208.  
  5209.  
  5210. Like triangles, the bicubic patch is not meant to be generated by hand. These
  5211. shapes should be created by a special utility. You may  be  able  to  acquire
  5212. utilities to generate these shapes  from  the  same  source  from  which  you
  5213. obtained POV-Ray.
  5214.  
  5215.   bicubic_patch {
  5216.     type 1
  5217.     flatness 0.01
  5218.     u_steps 4
  5219.     v_steps 4
  5220.     <0, 0, 2>, <1, 0, 0>, <2, 0, 0>, <3, 0,-2>,
  5221.     <0, 1  0>, <1, 1, 0>, <2, 1, 0>, <3, 1, 0>,
  5222.     <0, 2, 0>, <1, 2, 0>, <2, 2, 0>, <3, 2, 0>,
  5223.     <0, 3, 2>, <1, 3, 0>, <2, 3, 0>, <3, 3, -2>
  5224.   }
  5225.  
  5226.  
  5227. The triangles in a POV-Ray bicubic_patch  are  automatically  smoothed  using
  5228. normal interpolation but it is up to the user (or the user's utility program)
  5229. to create control points which smoothly stitch together groups of patches.
  5230.  
  5231. As with the other shapes, bicubic_patch objects can be  translated,  rotated,
  5232. and scaled. Because they are finite they respond to automatic bounding. Since
  5233. it's made from triangles, a bicubic_patch cannot be used in CSG  intersection
  5234. or difference types or inside a clipped_by modifier because triangles have no
  5235. clear "inside". The CSG union type works acceptably.
  5236.  
  5237. 3.5.2.2          Disc
  5238.  
  5239. A disc. One other flat, finite object type is available  with  POV-Ray.  Note
  5240. that a disc is infinitely thin. It has no thickness. If you want a disc  with
  5241. true thickness you should use a very short cylinder.  A  disc  shape  may  be
  5242. defined by:
  5243.  
  5244.   disc {
  5245.     <CENTER>, <NORMAL>, RADIUS [, HOLE_RADIUS ]
  5246.   }
  5247.  
  5248.  
  5249. The vector <CENTER> defines the x, y, z coordinates  of  the  center  of  the
  5250. disc. The <NORMAL> vector describes its orientation by describing its surface
  5251. normal vector. This is followed by a float specifying the RADIUS. This may be
  5252. optionally followed by another float specifying the radius of a  hole  to  be
  5253. cut from the center of the disc.
  5254.  
  5255. As with the other shapes, discs  can  be  translated,  rotated,  and  scaled.
  5256. Because they are finite they respond to automatic bounding.  Disc  cannot  be
  5257. used in CSG intersection or difference types or inside a clipped_by  modifier
  5258. because it has no clear "inside". The CSG union type works acceptably.
  5259.  
  5260. 3.5.2.3          Mesh
  5261.  
  5262. A triangle mesh. The mesh object can be used to efficiently trace  meshes  of
  5263. hundreds or thousands of triangles. Its syntax is:
  5264.  
  5265.   mesh {
  5266.     triangle {
  5267.       <CORNER1>, <CORNER2>, <CORNER3>
  5268.       [ texture { STRING } ]
  5269.     }
  5270.     smooth_triangle {
  5271.       <CORNER1>, <NORMAL1>,
  5272.       <CORNER2>, <NORMAL2>,
  5273.       <CORNER3>, <NORMAL3>
  5274.       [ texture { STRING } ]
  5275.     }
  5276.     [ hierarchy FLAG ]
  5277.   }
  5278.  
  5279.  
  5280. Any number of triangles and/or smooth triangles can be used and each of those
  5281. triangles can be individually textured by assigning a texture name to it. The
  5282. texture has to be declared before the mesh is parsed. It is not  possible  to
  5283. use texture definitions inside the triangle or  smooth  triangle  statements.
  5284. This is a restriction that is necessary  for  an  efficient  storage  of  the
  5285. assigned textures.
  5286.  
  5287. The mesh's components are internally bounded by a bounding box  hierarchy  to
  5288. speed up intersection testing. The bounding hierarchy can be turned off  with
  5289. the "hierarchy" keyword. This should only be done if memory is short  or  the
  5290. mesh consists of only a few triangles.
  5291.  
  5292. Copies of a mesh object refer to the same triangle data and thus consume very
  5293. little memory. You can easily trace hundred copies of a 10000  triangle  mesh
  5294. without running out of memory (assuming the first mesh fits into memory).
  5295.  
  5296. The mesh object can currently  only  include  triangle  and  smooth  triangle
  5297. components.  That  restriction  is  liable  to  change,  allowing  polygonal
  5298. components, at some point in the future.
  5299.  
  5300. Meshes are finite and respond to automatic bounding. As with all shapes, they
  5301. can be translated, rotated and scaled. They can only be used with CSG unions.
  5302.  
  5303.  
  5304. 3.5.2.4          Polygon
  5305.  
  5306. A polygon. Polygons are useful for creating rectangles,  squares,  and  other
  5307. planar shapes with more than three edges (you'd use a triangle for this).
  5308.  
  5309. The polygon syntax is:
  5310.  
  5311.   polygon {
  5312.     NUMBER_OF_POINTS,
  5313.     <POINT_1>, <POINT_2>, ..., <POINT_n>
  5314.   }
  5315.  
  5316.  
  5317. The points <POINT1> through <POINTn> are two dimensional  vectors  describing
  5318. the shape of the polygon in the xy plane.  You  enter  two  values  for  each
  5319. coordinate, and the program assumes that the z value is  always  zero.  Place
  5320. the polygon at its final location using rotate and translate. The polygon  is
  5321. automatically closed so there's no need for setting <POINTn> = <POINT1>.
  5322.  
  5323. A square polygon that matches the default planar imagemap is simply:
  5324.  
  5325.   polygon {
  5326.     4,
  5327.     <0, 0>, <0, 1>, <1, 1>, <1, 0>
  5328.     texture {
  5329.       finish { ambient 1 diffuse 0 }
  5330.       pigment { image_map { gif "test.gif"  } }
  5331.     }
  5332.     //scale and rotate as needed here
  5333.   }
  5334.  
  5335.  
  5336. A complex example for a polygon is the letter "P":
  5337.  
  5338.   #declare P = polygon {
  5339.     12,
  5340.     <0, 0>, <0, 6>, <4, 6>, <4, 3>, <1, 3>, <1, 0>, <0, 0>,
  5341.     <1, 4>, <1, 5>, <3, 5>, <3, 4>, <1, 4>
  5342.   }
  5343.  
  5344.  
  5345. This polygon is actually made up of two polygons. The first one (on the first
  5346. line) describes the outer shape of the letter "P". The second polygon (on the
  5347. second line) describes the rectangular hole that is cut in  the  top  of  the
  5348. letter "P". Note that in this case both rectangles have to  be  closed,  i.e.
  5349. their first and last points have to be the same. You can cut  more  than  one
  5350. hole in any polygon if you make sure that all polygons that are used for  the
  5351. holes are inside the polygon you are  cutting  from  and  that  they  do  not
  5352. overlapp.
  5353.  
  5354. The feature of  cutting  holes  into  a  polygon  is  based  on  the  polygon
  5355. inside/outside test used. A point is considerd to be inside a  polygon  if  a
  5356. straight line drawn from this point in an arbitrary direction crosses an  odd
  5357. number of edges (this is known as Jordan's  curve  theorem).  Based  on  that
  5358. knowledge it is also possible to cut more than one hole in a polygon. This is
  5359. something to experiment with.
  5360.  
  5361. Polygons respond to automatic bounding and can  be  translated,  rotated  and
  5362. scaled.
  5363.  
  5364. 3.5.2.5          Triangle and smooth triangle
  5365.  
  5366. A triangle. The triangle primitive is available in order to make more complex
  5367. objects than the built-in shapes  will  permit.  Triangles  are  usually  not
  5368. created by  hand,  but  are  converted  from  other  files  or  generated  by
  5369. utilities.
  5370.  
  5371. A triangle is defined by:
  5372.  
  5373.   triangle {
  5374.     <CORNER1>, <CORNER2>, <CORNER3>
  5375.   }
  5376.  
  5377.  
  5378. where <CORNERn> is a vector defining the x, y, z coordinates of  each  corner
  5379. of the triangle.
  5380.  
  5381. Because triangles are perfectly flat  surfaces  it  would  require  extremely
  5382. large numbers of  very  small  triangles  to  approximate  a  smooth,  curved
  5383. surface. However much of our perception of smooth surfaces is dependent  upon
  5384. the way light and shading is done.  By  artificially  modifying  the  surface
  5385. normals we can simulate as smooth surface  and  hide  the  sharp-edged  seams
  5386. between individual triangles.
  5387.  
  5388. The smooth triangle primitive is used for  just  such  purposes.  The  smooth
  5389. triangles use a formula called Phong normal interpolation  to  calculate  the
  5390. surface normal for any point on the triangle based on  normal  vectors  which
  5391. you define for the three corners. This makes the  triangle  appear  to  be  a
  5392. smooth curved surface. A smooth triangle is defined by:
  5393.  
  5394.   smooth_triangle {
  5395.     <CORNER1>, <NORMAL1>,
  5396.     <CORNER2>, <NORMAL2>,
  5397.     <CORNER3>, <NORMAL3>
  5398.   }
  5399.  
  5400.  
  5401. where the corners are defined as in regular  triangles  and  <NORMALn>  is  a
  5402. vector describing the direction of the surface normal at each corner.
  5403.  
  5404. These  normal  vectors  are  prohibitively  difficult  to  compute  by  hand.
  5405. Therefore smooth triangles are almost always generated by  utility  programs.
  5406. To achieve smooth results, any triangles which share a common  vertex  should
  5407. have the same normal vector at that vertex.  Generally  the  smoothed  normal
  5408. should be the average of all the actual normals of the triangles which  share
  5409. that point.
  5410.  
  5411. 3.5.3            Infinite Solid Primitives
  5412.  
  5413. There are 5 polynomial primitive shapes that are possibly infinite and do not
  5414. respond to automatic bounding. They do have a well defined inside and may  be
  5415. used in CSG. They are plane, cubic, poly, quadric, and quartic.
  5416.  
  5417. 3.5.3.1          Plane
  5418.  
  5419. The plane primitive is a simple way to define an infinite flat  surface.  The
  5420. plane is specified as follows:
  5421.  
  5422.   plane { <NORMAL>, DISTANCE }
  5423.  
  5424.  
  5425. The <NORMAL> vector defines the surface normal of the plane. A surface normal
  5426. is a vector which points up from the surface at a 90 degree  angle.  This  is
  5427. followed by a float value that gives the distance along the normal  that  the
  5428. plane is from the origin. For example:
  5429.  
  5430.   plane { <0,1,0>,4 }
  5431.  
  5432.  
  5433. This is a plane where "straight up" is defined in the positive  y  direction.
  5434. The plane is 4 units in that direction away from  the  origin.  Because  most
  5435. planes are defined with surface normals in the direction of an axis, you will
  5436. often see  planes  defined  using  the  "x",  "y",  or  "z"  built-in  vector
  5437. identifiers. The example above could be specified as:
  5438.  
  5439.   plane { y,4 }
  5440.  
  5441.  
  5442. The plane extends infinitely in  the  x  and  z  directions.  It  effectively
  5443. divides the world into two pieces. By definition the normal vector points  to
  5444. the outside of the plane while any points away from the vector are defined as
  5445. inside. This inside/outside distinction is only important when  using  planes
  5446. in CSG.
  5447.  
  5448. As with the other shapes, planes can  be  translated,  rotated,  and  scaled.
  5449. Because they are infinite they do not respond to automatic  bounding.  Planes
  5450. can be used freely in CSG because they have a clear defined "inside".
  5451.  
  5452. A plane is called a "polynomial" shape because it is defined by a first order
  5453. polynomial equation. Given a plane:
  5454.  
  5455.   plane { <A, B, C>, D }
  5456.  
  5457.  
  5458. it can be represented by the equation:
  5459.  
  5460.   A*x + B*y + C*z - D = 0
  5461.  
  5462.  
  5463. Therefore our example "plane  {y,4}"  is  actually  the  polynomial  equation
  5464. "y=4". You can think of this as a set of all x,y,z points where  all  have  y
  5465. values equal to 4, regardless of the x or z values.
  5466.  
  5467. This equation is a "first order" polynomial because each term  contains  only
  5468. single powers of x, y or z. A second order equation has terms like x^2,  y^2,
  5469. z^2, xy, xz and yz. Another name for  a  2nd  order  equation  is  a  quadric
  5470. equation. Third order polys are called cubics. A  4th  order  equation  is  a
  5471. quartic. Such shapes are described in the sections below.
  5472.  
  5473. 3.5.3.2          Poly, Cubic and Quartic
  5474.  
  5475. A quartic surface (quartic cylinder). Higher order polynomial surfaces may be
  5476. defined by the use of a poly shape. The syntax is:
  5477.  
  5478.   poly { ORDER, <T1, T2, T3, .... Tm> }
  5479.  
  5480.  
  5481. Where ORDER is a whole number from 2 to  7  inclusively  that  specifies  the
  5482. order of the equation. T1, T2... Tm are float values for the coefficients  of
  5483. the equation. There are "m" such terms where
  5484.  
  5485.   m = ((ORDER+1)*(ORDER+2)*(ORDER+3))/6
  5486.  
  5487.  
  5488. An alternate way to specify 3rd order polys is:
  5489.  
  5490.   cubic { <T1, T2,... T20> }
  5491.  
  5492.  
  5493. Also 4th order equations may be specified with:
  5494.  
  5495.   quartic { <T1, T2,... T35> }
  5496.  
  5497.  
  5498. Here's a  more  mathematical  description  of  quartics  for  those  who  are
  5499. interested. Quartic surfaces are 4th order  surfaces,  and  can  be  used  to
  5500. describe a large class of shapes including the torus,  the  lemniscate,  etc.
  5501. The general equation for a quartic equation in three variables is (hold  onto
  5502. your hat):
  5503.  
  5504.   a00 x^4 + a01 x^3 y + a02 x^3 z+ a03 x^3 + a04 x^2 y^2+
  5505.   a05 x^2 y z+ a06 x^2 y + a07 x^2 z^2+a08 x^2 z+a09 x^2+
  5506.   a10 x y^3+a11 x y^2 z+ a12 x y^2+a13 x y z^2+a14 x y z+
  5507.   a15 x y + a16 x z^3 + a17 x z^2 + a18 x z + a19 x+
  5508.   a20 y^4 + a21 y^3 z + a22 y^3+ a23 y^2 z^2 +a24 y^2 z+
  5509.   a25 y^2 + a26 y z^3 + a27 y z^2 + a28 y z + a29 y+
  5510.   a30 z^4 + a31 z^3 + a32 z^2 + a33 z + a34 = 0
  5511.  
  5512.  
  5513. To declare a quartic surface requires that each of the  coefficients  (a0  ->
  5514. a34) be placed in order into a single long vector of 35 terms.
  5515.  
  5516. As an example let's define a torus the hard way. A Torus can  be  represented
  5517. by the equation:
  5518.  
  5519.  x^4 + y^4 + z^4 + 2 x^2 y^2 + 2 x^2 z^2 + 2 y^2 z^2 -
  5520.  2 (r0^2 + r1^2) x^2 + 2 (r0^2 - r1^2) y^2 -
  5521.  2 (r0^2 + r1^2) z^2 + (r0^2 - r1^2)^2 = 0
  5522.  
  5523.  
  5524. Where r0 is the "major" radius of the torus, the distance from  the  hole  of
  5525. the donut to the middle of the ring of the  donut,  and  r1  is  the  "minor"
  5526. radius of the torus, the distance from the middle of the ring of the donut to
  5527. the outer surface. The following object declaration is  for  a  torus  having
  5528. major radius 6.3 minor radius 3.5 (Making the maximum width just under 20).
  5529.  
  5530.   //Torus having major radius sqrt(40), minor radius sqrt(12)
  5531.  
  5532.   quartic {
  5533.     < 1,   0,   0,   0,   2,   0,   0,   2,   0,
  5534.    -104,   0,   0,   0,   0,   0,   0,   0,   0,
  5535.       0,   0,   1,   0,   0,   2,   0,  56,   0,
  5536.       0,   0,   0,   1,   0, -104,  0, 784 >
  5537.     sturm
  5538.     bounded_by { // bounded_by speeds up the render,
  5539.                  // see bounded_by
  5540.                  // explanation later
  5541.                  // in docs for more info.
  5542.      sphere { <0, 0, 0>, 10 }
  5543.     }
  5544.   }
  5545.  
  5546.  
  5547. Poly, cubic and quartics are just like quadrics in that  you  don't  have  to
  5548. understand what one is to  use  one.  The  file  SHAPESQ.INC  has  plenty  of
  5549. pre-defined quartics for you to play with. The syntax for using a pre-defined
  5550. quartic is:
  5551.  
  5552.   object { Quartic_Name }
  5553.  
  5554.  
  5555. As with the other shapes,  these  shapes  can  be  translated,  rotated,  and
  5556. scaled. Because they are (almost always) infinite  they  do  not  respond  to
  5557. automatic bounding. They can be used freely in CSG because they have a  clear
  5558. defined "inside".
  5559.  
  5560. Polys use highly complex computations and will not always  render  perfectly.
  5561. If the surface is not smooth, has dropouts, or extra random pixels, try using
  5562. the optional keyword "sturm" in the definition. This will cause a slower, but
  5563. more accurate calculation method to be used. Usually, but  not  always,  this
  5564. will solve the problem. If sturm doesn't work, try rotating,  or  translating
  5565. the shape by some small amount. See the sub-directory MATH  for  examples  of
  5566. polys in scenes.
  5567.  
  5568. There are really so many different quartic shapes, we  can't  even  begin  to
  5569. list or describe them all. If you are interested and mathematically inclined,
  5570. an excellent reference book for curves and surfaces where  you'll  find  more
  5571. quartic shape formulas is:
  5572.  
  5573.   "The CRC Handbook of Mathematical Curves and Surfaces"
  5574.   David von Seggern
  5575.   CRC Press
  5576.   1990
  5577.  
  5578.  
  5579. 3.5.3.3          Quadric
  5580.  
  5581. A quadric surface (paraboloid). Quadric  surfaces  can  produce  shapes  like
  5582. ellipsoids,  spheres,  cones,  cylinders,  paraboloids  (dish  shapes),  and
  5583. hyperboloids (saddle or hourglass shapes). NOTE:  Do  not  confuse  "quaDRic"
  5584. with "quaRTic". A quadric is a 2nd order polynomial while a  quartic  is  4th
  5585. order. Quadrics render much faster and are less error-prone.
  5586.  
  5587. A quadric is defined in POV-Ray by:
  5588.  
  5589.   quadric { <A,B,C>, <D,E,F>, <G,H,I>, J }
  5590.  
  5591.  
  5592. where A through J are float expressions.
  5593.  
  5594. This defines a surface of x,y,z points which satisfy the equation:
  5595.  
  5596.   A x^2   + B y^2   + C z^2 +
  5597.   D xy    + E xz    + F yz +
  5598.   G x     + H y     + I z    + J = 0
  5599.  
  5600.  
  5601. Different values of A,B,C,...J will give different shapes. So,  if  you  take
  5602. any three dimensional point and use its x, y, and z coordinates in the  above
  5603. equation, the answer will be 0 if the point is on the surface of the  object.
  5604. The answer will be negative if the point is inside the object and positive if
  5605. the point is outside the object. Here are some examples:
  5606.  
  5607.   X^2 + Y^2 + Z^2 - 1 = 0  Sphere
  5608.   X^2 + Y^2 - 1 = 0        Infinite cylinder along the Z axis
  5609.   X^2 + Y^2 - Z^2 = 0      Infinite cone along the Z axis
  5610.  
  5611.  
  5612. The easiest way  to  use  these  shapes  is  to  include  the  standard  file
  5613. "SHAPES.INC" into your program. It contains several pre-defined quadrics  and
  5614. you can transform these pre-defined  shapes  (using  translate,  rotate,  and
  5615. scale) into the ones you want.
  5616.  
  5617. You can invoke them by using the syntax,
  5618.  
  5619.   object { Quadric_Name }
  5620.  
  5621.  
  5622. The pre-defined quadrics are centered about the origin <0, 0, 0> and  have  a
  5623. radius of 1. Don't confuse radius with width. The radius is half the diameter
  5624. or width making the standard quadrics 2 units wide.
  5625.  
  5626. Some of the pre-defined quadrics are,
  5627.  
  5628.   Ellipsoid
  5629.   Cylinder_X, Cylinder_Y, Cylinder_Z
  5630.   QCone_X, QCone_Y, QCone_Z
  5631.   Paraboloid_X, Paraboloid_Y, Paraboloid_Z
  5632.  
  5633.  
  5634. 3.5.4            Constructive Solid Geometry
  5635.  
  5636. POV-Ray supports  Constructive  Solid  Geometry  (CSG)  with  four  different
  5637. operations: difference, intersection, merge and union.
  5638.  
  5639. 3.5.4.1          About CSG
  5640.  
  5641. Constructive Solid Geometry is a technique for combining two or more  objects
  5642. to create a new object. It only works with solid objects, i.e.  objects  that
  5643. have a well-defined interior. This is the case for all objects  described  in
  5644. the sections "Finite Solid Primitives" and "Infinite Solid Primitives" .
  5645.  
  5646. CSG is based on the three boolean operations and, or and negate.
  5647.  
  5648. CSG shapes may be used in CSG  shapes.  In  fact,  CSG  shapes  may  be  used
  5649. anyplace that a standard shape is used.
  5650.  
  5651. The order of the component shapes with the CSG doesn't  matter  except  in  a
  5652. difference shape. For CSG differences, the first shape  is  visible  and  the
  5653. remaining shapes are cut out of the first.
  5654.  
  5655. Constructive solid geometry shapes may be translated, rotated, or  scaled  in
  5656. the same way as any shape.  The  shapes  making  up  the  CSG  shape  may  be
  5657. individually translated, rotated, and scaled as well.
  5658.  
  5659. When using CSG, it is often useful to invert a shape so that it's inside-out.
  5660. The appearance of the shape  is  not  changed,  just  the  way  that  POV-Ray
  5661. perceives it. The inverse keyword can be used to do this for any shape.
  5662.  
  5663. When inverse is used, the "inside" of the shape  is  flipped  to  become  the
  5664. "outside". For planes, "inside" is defined to be "in the  opposite  direction
  5665. to the "normal" or "up" direction.
  5666.  
  5667. Note that performing an intersection between a shape and some  other  inverse
  5668. shapes is the same as performing a difference. In  fact,  the  difference  is
  5669. actually implemented in this way in the code.
  5670.  
  5671. 3.5.4.2          Inside and Outside
  5672.  
  5673. Most shape primitives, like spheres, boxes, and blobs, divide the world  into
  5674. two regions. One region is inside the surface and one is outside.
  5675.  
  5676. Given any point in space, you can say  it's  either  inside  or  outside  any
  5677. particular primitive object (well, it could be exactly on  the  surface,  but
  5678. numerical inaccuracies will put it to one side or the other).
  5679.  
  5680. Even planes have an inside and an outside. By definition, the surface  normal
  5681. of the plane points towards the outside of the plane. (For  a  simple  floor,
  5682. for example, the space above the floor is "outside" and the space  below  the
  5683. floor is "inside". For simple floors this in un-important, but for planes  as
  5684. parts of CSG's it becomes much more important).  CSG  uses  the  concepts  of
  5685. inside and outside to combine shapes together. Take the following  situation:
  5686.  
  5687.  
  5688. Note: The diagrams shown here demonstrate the concepts in 2D and are intended
  5689. only as an analogy to the 3D case.
  5690.  
  5691. Note that the triangles and triangle-based shapes cannot  be  used  as  solid
  5692. objects in CSG since they have no clear inside and outside.
  5693.  
  5694. In this diagram, point 1 is inside object A only. Point 2 is inside  B  only.
  5695. Point 3 is inside both A and B while point 0 is outside everything.
  5696.  
  5697. 3.5.4.3          Union
  5698.  
  5699. * = Object A
  5700. % = Object B
  5701.  
  5702.          *  0
  5703.         * *    %
  5704.        *   *  % %
  5705.       *     *%   %
  5706.      *  1   %*    %
  5707.     *      %  * 2  %
  5708.    *      % 3  *    %
  5709.   *******%*******    %
  5710.         %             %
  5711.        %%%%%%%%%%%%%%%%%
  5712. The union of a box and a cylinder.
  5713.  
  5714. Unions are simply "glue", used to bind two  or  more  shapes  into  a  single
  5715. entity that can be manipulated as a single object. The image above shows  the
  5716. union of A and B. The new object created by the union operation can  then  be
  5717. scaled, translated, and rotated as a single shape. The entire union can share
  5718. a single texture, but each object contained in the union may  also  have  its
  5719. own texture, which will override  any  matching  texture  statements  in  the
  5720. parent object.
  5721.  
  5722.   union {
  5723.     box { <-1.5, -1, -1>, <0.5, 1, 1> pigment { Red } }
  5724.     cylinder { <0.5, 0, -1>, <0.5, 0, 1>, 1 pigment { Green } }
  5725.   }
  5726.  
  5727.  
  5728. This union will contain three spheres. The first sphere is explicitly colored
  5729. Red while the other two will be shiny blue. Note that the shiny  finish  does
  5730. NOT apply to the first  sphere.  This  is  because  the  "pigment  {Red}"  is
  5731. actually shorthand for "texture  {pigment  {Red}}".  It  attaches  an  entire
  5732. texture with default normals and finish. The textures or pieces  of  textures
  5733. attached to the union apply  ONLY  to  components  with  no  textures.  These
  5734. texturing rules also apply to intersection, difference and merge as well.
  5735.  
  5736. Earlier versions of POV-Ray placed restrictions on unions so you often had to
  5737. combine objects with composite statements. Those  earlier  restrictions  have
  5738. been lifted so composite is no longer needed. Composite  is  still  supported
  5739. for backwards compatibility but it is recommended that union now be  used  in
  5740. it's place since future support for the composite keyword is not guaranteed.
  5741.  
  5742. 3.5.4.4          Intersection
  5743.  
  5744. A point is inside the intersection if it's inside both A AND B. This "logical
  5745. AND's" the shapes and  gets  the  common  part,  most  useful  for  "cutting"
  5746. infinite shapes off. The diagram below consists of only those parts common to
  5747. A and B.
  5748.  
  5749.           %*
  5750.          %  *
  5751.         % 3  *
  5752.        %*******
  5753. The intersection between a box and a cylinder.
  5754.  
  5755. For example:
  5756.  
  5757.   intersection {
  5758.     box { <-1.5, -1, -1>, <0.5, 1, 1> pigment { Red } }
  5759.     cylinder { <0.5, 0, -1>, <0.5, 0, 1>, 1 pigment { Green } }
  5760.   }
  5761.  
  5762.  
  5763. 3.5.4.5          Difference
  5764.  
  5765. A point is inside the difference if it's inside  A  but  not  inside  B.  The
  5766. results is a "subtraction" of the 2nd shape from the first shape.
  5767.  
  5768.        *
  5769.       * *
  5770.      *   *
  5771.     *     *
  5772.    *  1   %
  5773.   *      %
  5774.  *      %
  5775. *******%
  5776. A cylinder is subtracted from a box..
  5777.  
  5778. For example:
  5779.  
  5780.   difference {
  5781.     box { <-1.5, -1, -1>, <0.5, 1, 1> pigment { Red } }
  5782.     cylinder { <0.5, 0, -1>, <0.5, 0, 1>, 1 pigment { Green } }
  5783.   }
  5784.  
  5785.  
  5786. 3.5.4.6          Merge
  5787.  
  5788. As can be seen in the image for union, the inner surfaces where  the  objects
  5789. overlap are still present. On transparent  or  clipped  objects  these  inner
  5790. surfaces cause problems.  A  merge  object  works  just  like  union  but  it
  5791. eliminates the inner surfaces like shown in the figure.
  5792.  
  5793.          *
  5794.         * *    %
  5795.        *   *  % %
  5796.       *     *%   %
  5797.      *      %     %
  5798.     *      %       %
  5799.    *      %         %
  5800.   *******%           %
  5801.         %             %
  5802.        %%%%%%%%%%%%%%%%%
  5803. Transparent union showing inner surfaces.
  5804.  
  5805.          *
  5806.         * *    %
  5807.        *   *  % %
  5808.       *     *%   %
  5809.      *            %
  5810.     *              %
  5811.    *                %
  5812.   *******%           %
  5813.         %             %
  5814.        %%%%%%%%%%%%%%%%%
  5815. Transparent merge without inner surfaces.
  5816.  
  5817. 3.5.5            Light Sources
  5818.  
  5819. The last object we'll cover is  the  light  source.  Light  sources  have  no
  5820. visible shape of their own. They are just points or areas which  emit  light.
  5821. Their full syntax is:
  5822.  
  5823.   light_source {
  5824.     <CENTER>
  5825.     color <COLOUR>
  5826.     [ spotlight ]
  5827.     [ point_at <POINT> ]
  5828.     [ radius RADIUS ]
  5829.     [ falloff FALLOFF ]
  5830.     [ tightness TIGHTNESS ]
  5831.     [ area_light <AXIS1>, <AXIS2>, SIZE1, SIZE2 ]
  5832.     [ adaptive ADAPTIVE ]
  5833.     [ jitter JITTER ]
  5834.     [ looks_like { OBJECT } ]
  5835.     [ fade_distance FADE_DISTANCE ]
  5836.     [ fade_power FADE_POWER ]
  5837.     [ atmospheric_attenuation BOOL ]
  5838.   }
  5839.  
  5840.  
  5841. The different type of light sources and the optional modifiers are  described
  5842. in the following sections.
  5843.  
  5844. 3.5.5.1          Point Lights
  5845.  
  5846. A point light source sends light of the  specified  color  uniformly  in  all
  5847. directions. Its location is described by the CENTER vector and its  color  is
  5848. given by COLOR. It's syntax is:
  5849.  
  5850.   light_source {
  5851.     <CENTER>
  5852.     color <COLOUR>
  5853.     [ looks_like { OBJECT } ]
  5854.     [ fade_distance FADE_DISTANCE ]
  5855.     [ fade_power FADE_POWER ]
  5856.     [ atmospheric_attenuation BOOL ]
  5857.   }
  5858.  
  5859.  
  5860. 3.5.5.2          Spotlights
  5861.  
  5862. A spotlight is a point light source where the rays of light  are  constrained
  5863. by a cone. The light is bright in the  center  of  the  spotlight  and  falls
  5864. off/darkens to soft shadows at the edges of the circle.
  5865.  
  5866. The syntax is:
  5867.  
  5868.   light_source {
  5869.     <CENTER>
  5870.     color <COLOUR>
  5871.     spotlight
  5872.     point_at <POINT>
  5873.     radius RADIUS
  5874.     falloff FALLOFF
  5875.     tightness TIGHTNESS
  5876.     [ looks_like { OBJECT } ]
  5877.     [ fade_distance FADE_DISTANCE ]
  5878.     [ fade_power FADE_POWER ]
  5879.     [ atmospheric_attenuation BOOL ]
  5880.   }
  5881.  
  5882.  
  5883. The spotlight is identified by the "spotlight" keyword. Its located at CENTER
  5884. and  points  at  POINT.  The  following  illustrations  will  be  helpful  in
  5885. understanding how these values relate to each other:
  5886.  
  5887.      (+) Spotlight <center>
  5888.      / \
  5889.     /   \
  5890.    /     \
  5891.   /       \
  5892.  /         \
  5893. /           \
  5894. +-----*-----+
  5895.       ^ point_at <point>
  5896. Spotlight center and point_at.
  5897.  
  5898. Spotlights also have three other parameters: radius, falloff, and  tightness.
  5899.  
  5900.  
  5901. Think of a spotlight as two nested cones. The inner cone is specified by  the
  5902. radius parameter, and is fully lit. The outer cone is the falloff cone beyond
  5903. which there is no light. The values for these two  parameters  are  half  the
  5904. opening angles of the corresponding cones.
  5905.  
  5906. The tightness value specifies how quickly the light dims, or  falls  off,  in
  5907. the region between the radius (full brightness inside) cone and  the  falloff
  5908. (full darkness outside) cone. The default value for tightness  is  10.  Lower
  5909. tightness values will make the spot have very soft edges.  High  values  will
  5910. make the edges sharper,  the  spot  "tighter".  Values  from  1  to  100  are
  5911. acceptable.
  5912.  
  5913. Spotlights may be used anyplace that a normal  light  source  is  used.  Like
  5914. normal light sources, they are invisible points. They are treated  as  shapes
  5915. and may be included in CSG shapes. They may also be used in conjunction  with
  5916. area lights.
  5917.  
  5918. 3.5.5.3          Cylindrical Lights
  5919.  
  5920. Cylindrical light sources work pretty much like spotlights  except  that  the
  5921. light rays are constraint by a cylinder and not a cone. Their syntax is:
  5922.  
  5923.   light_source {
  5924.     <CENTER>
  5925.     color <COLOUR>
  5926.     cylinder
  5927.     point_at <POINT>
  5928.     radius RADIUS
  5929.     falloff FALLOFF
  5930.     tightness TIGHTNESS
  5931.     [ looks_like { OBJECT } ]
  5932.     [ fade_distance FADE_DISTANCE ]
  5933.     [ fade_power FADE_POWER ]
  5934.     [ atmospheric_attenuation BOOL ]
  5935.   }
  5936.  
  5937.  
  5938. The radius, falloff and tightness keywords control the same features as  with
  5939. the spotlight.
  5940.  
  5941. You should keep in mind that the cylindrical light source is  still  a  point
  5942. light source. The rays emit from one point  and  are  only  constraint  by  a
  5943. cylinder. The light rays are not parallel.
  5944.  
  5945. 3.5.5.4          Area Lights
  5946.  
  5947. Area light sources occupy a finite area of space. They can cast soft  shadows
  5948. because they can partially block light.
  5949.  
  5950. The area lights used in POV-Ray are rectangular in shape, sort of like a flat
  5951. panel light. Rather than performing the complex calculations  that  would  be
  5952. required to model a true area light,  it  is  approximated  as  an  array  of
  5953. "point" light sources spread out over the area occupied  by  the  light.  The
  5954. intensity of each individual point light in the array is dimmed so  that  the
  5955. total amount of light emitted by the  light  is  equal  to  the  light  color
  5956. specified in the declaration. It's syntax is:
  5957.  
  5958.   light_source {
  5959.     <CENTER>
  5960.     color <COLOUR>
  5961.     area_light <AXIS1>, <AXIS2>, SIZE1, SIZE2
  5962.     adaptive ADAPTIVE
  5963.     jitter JITTER
  5964.     [ spotlight ]
  5965.     [ point_at <POINT> ]
  5966.     [ radius RADIUS ]
  5967.     [ falloff FALLOFF ]
  5968.     [ tightness TIGHTNESS ]
  5969.     [ looks_like { OBJECT } ]
  5970.     [ fade_distance FADE_DISTANCE ]
  5971.     [ fade_power FADE_POWER ]
  5972.     [ atmospheric_attenuation BOOL ]
  5973.   }
  5974.  
  5975.  
  5976. The light's location and color are specified in the same  way  as  a  regular
  5977. light source.
  5978.  
  5979. The area_light command defines the size and orientation of the area light  as
  5980. well as the number of lights in the light source array. The vectors AXIS1 and
  5981. AXIS2 specify the lengths and directions of the edges of the light. Since the
  5982. area lights are rectangular in shape these vectors should be perpendicular to
  5983. each other. The larger the size of the light the thicker that the  soft  part
  5984. of the shadow will be. The numbers SIZE1 and SIZE2 specify the dimensions  of
  5985. the array of point lights. The larger  the  number  of  lights  you  use  the
  5986. smoother your shadows will be but the longer they will take to render.
  5987.  
  5988. The adaptive command is used to enable adaptive sampling of the light source.
  5989. By default POV-Ray calculates the amount of light that reaches a surface from
  5990. an area light by shooting a test ray at every point light within  the  array.
  5991. As you can imagine this is very slow. Adaptive sampling  on  the  other  hand
  5992. attempts to approximate the same calculation by using  a  minimum  number  of
  5993. test rays. The number specified after the keyword controls how much  adaptive
  5994. sampling is used. The higher the number the more accurate your  shadows  will
  5995. be but the longer they will take to render. If you're not sure what value  to
  5996. use a good starting point is 'adaptive 1'. The adaptive command only  accepts
  5997. integer values and cannot be set lower than 0. Adaptive sampling is explained
  5998. in more detail later.
  5999.  
  6000. The jitter command is optional. When used it  causes  the  positions  of  the
  6001. point lights in the array to be randomly jittered  to  eliminate  any  shadow
  6002. banding that may occur. The jittering is completely  random  from  render  to
  6003. render and should not be used when generating animations.
  6004.  
  6005. Note: It's possible to specify spotlight  parameters  along  with  area_light
  6006. parameters to create "area spotlights." Using area spotlights is a  good  way
  6007. to speed up scenes that use area lights since you  can  confine  the  lengthy
  6008. soft shadow calculations to only the parts of your scene that need them.
  6009.  
  6010. An interesting effect that can be created  using  area  lights  as  a  linear
  6011. light. Rather than having a rectangular shape, a linear light stretches along
  6012. a line sort of like a thin fluorescent tube. To create a  linear  light  just
  6013. create an area light with one of the array dimensions set to 1.
  6014.  
  6015. When performing adaptive sampling POV-Ray starts by shooting a  test  ray  at
  6016. each of the four corners of the area light. If the amount of  light  received
  6017. from all four corners is approximately  the  same  then  the  area  light  is
  6018. assumed to be either fully in view or fully blocked. The light  intensity  is
  6019. then calculated as the average intensity of the light received from the  four
  6020. corners. However, if the  light  intensity  from  the  four  corners  differs
  6021. significantly then the area light is partially  blocked.  The  light  is  the
  6022. split into four quarters and each section is sampled as described above. This
  6023. allows POV-Ray to rapidly approximate how much of the area light is  in  view
  6024. without having to shoot a test ray at every light in the array.
  6025.  
  6026. While the adaptive sampling method  is  fast  (relatively  speaking)  it  can
  6027. sometimes produces inaccurate shadows. The solution is to reduce  the  amount
  6028. of adaptive sampling without completely turning it off. The number after  the
  6029. adaptive keyword adjusts the number of times that  the  area  light  will  be
  6030. split before the adaptive phase begins. For example if you use "adaptive 0" a
  6031. minimum of 4 rays will be shot at the  light.  If  you  use  "adaptive  1"  a
  6032. minimum of 9 rays will be shot (adaptive 2 = 25 rays, adaptive 3 =  81  rays,
  6033. etc).
  6034.  
  6035. Visually the pattern goes like this:
  6036.  
  6037.  adaptive    0            1           2         3
  6038.  rays        4            9           25        81
  6039.          * . . . *    * . * . *   * * * * *
  6040.          . . . . .    . . . . .   * * * * *
  6041.          . . . . .    * . * . *   * * * * *    etc...
  6042.          . . . . .    . . . . .   * * * * *
  6043.          * . . . *    * . * . *   * * * * *
  6044. Area light adaptive samples.
  6045.  
  6046. Obviously the more shadow rays you shoot the slower the rendering will be  so
  6047. you should use the lowest value that gives acceptable results.
  6048.  
  6049. The number of rays never exceeds the values you specify for rows and  columns
  6050. of points. For example: area_light x,y,4,4  specifies  a  4  by  4  array  of
  6051. lights. If you specify adaptive 3 it would mean that you should start with  a
  6052. 9 by 9 array. In this case no adaptive sampling is done. The 4 by 4 array  is
  6053. used.
  6054.  
  6055. 3.5.5.5          Shadowless
  6056.  
  6057. Using the "shadowless" keyword you can  stop  a  light  source  from  casting
  6058. shadows.
  6059.  
  6060. 3.5.5.6          Looks_like
  6061.  
  6062. Normally the light source itself has  no  visible  shape.  The  light  simply
  6063. radiates from an invisible point or area. You may give a light source  a  any
  6064. shape by adding a "looks_like {OBJECT }" statement.
  6065.  
  6066. There is an implied "no_shadow" attached to the  looks_like  object  so  that
  6067. light is not blocked by the object.  Without  the  automatic  no_shadow,  the
  6068. light inside the object would not escape. The object would, in effect, cast a
  6069. shadow over everything.
  6070.  
  6071. If you want the attached object to block light then you should attach it with
  6072. a union and not a looks_like as follows:
  6073.  
  6074.   union {
  6075.     light_source {<100,200,-300> color White}
  6076.     object {My_Lamp_Shade}
  6077.   }
  6078.  
  6079.  
  6080. 3.5.5.7          Light Fading
  6081.  
  6082. By default POV-Ray does not diminish  light  from  any  light  source  as  it
  6083. travels  through  space.  In  order  to  get   a   more   realistic   effect
  6084. "fade_distance" and "fade_power" can be used  to  model  the  distance  based
  6085. falloff in light intensity.
  6086.  
  6087. The "fade_distance" keyword is used to specify the distance at which the full
  6088. light intensity arrives, i.e. the intensity which was given  by  the  "color"
  6089. keyword. The actual attenuation is described  by  the  "fade_power"  keyword,
  6090. which determines the falloff rate. E.g. Linear or quadratic  falloff  can  be
  6091. used by setting FADE_POWER to 1 or 2 respectively. The  complete  formula  to
  6092. calculate the factor by which the light is attenuated is:
  6093.  
  6094.                                  2
  6095.   attenuation = --------------------------------------,
  6096.                  1 + (d / FADE_DISTANCE) ^ FADE_POWER
  6097.  
  6098.  
  6099. with d being the distance the light has traveled.
  6100.  
  6101. You should note two important facts: First, for FADE_DISTANCEs larger than  1
  6102. the  light  intensity  at  distances  smaller  than  FADE_DISTANCE  actually
  6103. increases. This is necessary to  get  the  light  source  color  at  distance
  6104. FADE_DISTANCE. Second, only light  coming  directly  from  light  sources  is
  6105. attenuated. Reflected or refracted light is not attenuated by distance.
  6106.  
  6107. 3.5.5.8          Atmospheric Attenuation
  6108.  
  6109. Normally light coming  from  light  sources  is  not  influenced  by  fog  or
  6110. atmosphere.  This  behavior  can  be  changed  by  turning  the  atmospheric
  6111. attenuation for a given light source on. All light  coming  from  this  light
  6112. source will now be diminished as it travels through fog or  atmosphere.  This
  6113. results in an distance-based, exponential intensity falloff ruled by the used
  6114. fog or atmosphere. If there is no fog or atmosphere no change will be seen.
  6115.  
  6116. 3.5.6            Object Modifiers
  6117.  
  6118. A variety of modifiers may be attached to objects.  Transformations  such  as
  6119. translate, rotate and scale have already been discussed. Textures  are  in  a
  6120. section of their  own  below.  Here  are  three  other  important  modifiers:
  6121. clipped_by, bounded_by and no_shadow. Although the examples below use  object
  6122. statements and object identifiers, these modifiers may be used on any type of
  6123. object such as sphere, box etc.
  6124.  
  6125. 3.5.6.1          Clipped_By
  6126.  
  6127. The "clipped_by" statement is technically an object modifier but it  provides
  6128. a type of CSG similar to CSG intersection. You attach a clipping object  like
  6129. this:
  6130.  
  6131.   object {
  6132.     My_Thing
  6133.     clipped_by{plane{y,0}}
  6134.   }
  6135.  
  6136.  
  6137. Every part of the object "My_Thing" that is  inside  the  plane  is  retained
  6138. while the remaining part is clipped off and  discarded.  In  an  intersection
  6139. object, the hole is closed off. With clipped_by it  leaves  an  opening.  For
  6140. example this diagram shows our object "A" being clipped_by a plane {y,0}.
  6141.  
  6142.    *       *
  6143.   *         *
  6144.  *           *
  6145. ***************
  6146. A cylinder clipped by a box.
  6147.  
  6148. Clipped_by may be used to slice off portions of any shape. In many  cases  it
  6149. will also result in faster rendering times than other methods of  altering  a
  6150. shape.
  6151.  
  6152. Often you will want to use the clipped_by and  bounded_by  options  with  the
  6153. same object. The following shortcut saves typing and uses less memory.
  6154.  
  6155.   object {
  6156.     My_Thing
  6157.     bounded_by{box{<0,0,0>,<1,1,1>}}
  6158.     clipped_by{bounded_by}
  6159.   }
  6160.  
  6161.  
  6162. 3.5.6.2          Bounded_By
  6163.  
  6164. The calculations necessary to test if a ray hits an object can be quite  time
  6165. consuming. Each ray has to be tested  against  every  object  in  the  scene.
  6166. POV-Ray attempts so speed up the process  by  building  a  set  of  invisible
  6167. boxes, called bounding boxes, which cluster the objects together. This way  a
  6168. ray that travels in one part of the scene doesn't have to be  tested  against
  6169. objects in another far away part of the scene. When large number objects  are
  6170. present the boxes are nested inside each  other.  POV-Ray  can  use  bounding
  6171. boxes on any finite object and even some clipped or bounded quadrics. However
  6172. infinite objects (such as a  planes,  quartic,  cubic  and  poly)  cannot  be
  6173. automatically bound. CSG objects are  automatically  bound  if  they  contain
  6174. finite (and in some cases even infinite) objects. This works by applying  the
  6175. CSG set operations to the bounding boxes of all objects used inside  the  CSG
  6176. object. For difference and intersection operations this will hardly ever lead
  6177. to  an  optimal  bounding  box.  It's  sometimes  better  (depending  on  the
  6178. complexity of the CSG object) to use a bounded_by statement with such shapes.
  6179.  
  6180.  
  6181. Normally bounding shapes are not necessary but there are cases where they can
  6182. be used to speed up the rendering of complex objects.  Bounding  shapes  tell
  6183. the ray tracer that the object is totally enclosed by a  simple  shape.  When
  6184. tracing rays, the ray is first tested against the simple bounding  shape.  If
  6185. it strikes the bounding shape, then the ray is  further  tested  against  the
  6186. more complicated  object  inside.  Otherwise  the  entire  complex  shape  is
  6187. skipped, which greatly speeds rendering.
  6188.  
  6189. To use bounding shapes, simply include the following lines in the declaration
  6190. of your object:
  6191.  
  6192.   bounded_by {
  6193.     object { ... }
  6194.   }
  6195.  
  6196.  
  6197. An example of a Bounding Shape:
  6198.  
  6199.   intersection {
  6200.     sphere {<0,0,0>, 2}
  6201.     plane  {<0,1,0>, 0}
  6202.     plane  {<1,0,0>, 0}
  6203.     bounded_by {sphere {<0,0,0>, 2}}
  6204.   }
  6205.  
  6206.  
  6207. The best bounding shape is a sphere or a box since these  shapes  are  highly
  6208. optimized, although, any shape may be used. If the bounding shape is itself a
  6209. finite shape which responds to  bounding  slabs  then  the  object  which  it
  6210. encloses will also be used in the slab system.
  6211.  
  6212. CSG shapes can benefit from bounding slabs  without  a  bounded_by  statement
  6213. however they may do so inefficiently in intersection, difference  and  merge.
  6214. In these three CSG types the automatic bound used covers all of the component
  6215. objects in their entirety. However the  result  of  these  intersections  may
  6216. result in a smaller object. Compare the sizes of the illustrations for  union
  6217. and intersection in the CSG section above. It is  possible  to  draw  a  much
  6218. smaller box around the intersection of A and B than the union of A and B  yet
  6219. the automatic bounds are the size of union {A B} regardless of  the  kind  of
  6220. CSG specified.
  6221.  
  6222. While it is almost always a  good  idea  to  manually  add  a  bounded_by  to
  6223. intersection, difference and merge, it is often best to NOT bound a union. If
  6224. a union has no bounded_by and no clipped_by then POV-Ray can internally split
  6225. apart the components of a union and apply automatic bounding slabs to any  of
  6226. its finite parts. Note that some utilities such as RAW2POV  may  be  able  to
  6227. generate bounds more efficiently than POV-Ray's current system. However  most
  6228. unions you create yourself can be easily bounded by the automatic system. For
  6229. technical reasons POV-Ray cannot split a merge object. It is probably best to
  6230. hand bound a merge, especially if it is very complex.
  6231.  
  6232. Note that if bounding shape is too small or positioned  incorrectly,  it  may
  6233. clip the object in undefined ways or the object may not appear at all. To  do
  6234. true clipping, use clipped_by as explained above. Often you will want to  use
  6235. the clipped_by and bounded_by options with the  same  object.  The  following
  6236. shortcut saves typing and uses less memory.
  6237.  
  6238.   object {
  6239.     My_Thing
  6240.     clipped_by{box{<0,0,0>,<1,1,1>}}
  6241.     bounded_by{clipped_by}
  6242.   }
  6243.  
  6244.  
  6245. 3.5.6.3          Hollow
  6246.  
  6247. POV-Ray by default assumes that objects are made of  a  solid  material  that
  6248. completely fills the interior of an object. By adding the "hollow" keyword to
  6249. the object you can make it hollow.
  6250.  
  6251. The "hollow" keyword is very useful if you want atmospheric effects to  exist
  6252. inside an object. It is even required for objects containing a halo.
  6253.  
  6254. 3.5.6.4          No_Shadow
  6255.  
  6256. You may specify the no_shadow keyword in an object and that object  will  not
  6257. cast a shadow. This is useful  for  special  effects  and  for  creating  the
  6258. illusion that a light source actually is visible. This keyword was  necessary
  6259. in earlier versions of POV-Ray which did not have the "looks_like" statement.
  6260. Now it is useful for  creating  things  like  laser  beams  or  other  unreal
  6261. effects.
  6262.  
  6263. Simply attach the keyword as follows:
  6264.  
  6265.   object {
  6266.     My_Thing
  6267.     no_shadow
  6268.   }
  6269.  
  6270.  
  6271. 3.6              Textures
  6272.  
  6273. The texture describes what the object looks like, i.e. its material. Textures
  6274. are combinations of pigments, normals, finishes, and halos.  Pigment  is  the
  6275. color or pattern of colors inherent in the material. Normal is  a  method  of
  6276. simulating various patterns of bumps, dents, ripples or  waves  by  modifying
  6277. the surface normal vector. Finish describes  the  reflective  and  refractive
  6278. properties of a material. Halo simulates effects like clouds, fog, fire  etc.
  6279. by using a density field defined inside the object.
  6280.  
  6281. A plain texture consists of a single pigment, an optional  normal,  a  single
  6282. finish and optionally one or more halos. A special texture  combines  two  or
  6283. more textures using a pattern or blending function. Special textures  may  be
  6284. made quite complex by nesting patterns  within  patterns.  At  the  innermost
  6285. levels however, they are made up from plain textures. Note that allthough  we
  6286. call a plain texture "plain" it may be  a  very  complex  texture.  The  term
  6287. "plain" only means that it has a single pigment, normal, finish and halo.
  6288.  
  6289. The most complete form for defining a plain texture is as follows:
  6290.  
  6291.   texture {
  6292.     TEXTURE_IDENTIFIER
  6293.     pigment {...}
  6294.     normal {...}
  6295.     finish {...}
  6296.     halo {...}
  6297.     TRANSFORMATIONS
  6298.   }
  6299.  
  6300.  
  6301. Each of the items in a texture are optional but  if  they  are  present,  the
  6302. identifier must be first and the transformations must be last.  The  pigment,
  6303. normal, and finish parameters modify any pigment, normal and  finish  already
  6304. specified in the TEXTURE_IDENTIFIER. Any  halos  are  added  to  the  already
  6305. existing halos. If no texture  identifier  is  specified  then  the  pigment,
  6306. normal and finish statements modify the current default values and  any  halo
  6307. is added to the default halo, if any. TRANSFORMATIONs are translate,  rotate,
  6308. scale and matrix statements. They should be specified last.
  6309.  
  6310. The sections below  describe  all  of  the  options  available  in  pigments,
  6311. normals, finishes and halos. Special textures are covered later.
  6312.  
  6313. 3.6.1            Pigment
  6314.  
  6315. The color or pattern of  colors  for  an  object  is  defined  by  a  pigment
  6316. statement. All plain textures must have a pigment. If you do not specify one,
  6317. the default pigment is used.  A  pigment  statement  is  part  of  a  texture
  6318. specification. However it can be tedious to type  "texture  {pigment  {...}}"
  6319. just to add a color to an object. Therefore you may attach a pigment directly
  6320. to an object without explicitly specifying that it as part of a texture.  For
  6321. example:
  6322.  
  6323.   //this...                //can be shortened to this...
  6324.  
  6325.   object {                 object {
  6326.     My_Object                My_Object
  6327.     texture {                pigment {color Red}
  6328.       pigment {color Red}  }
  6329.     }
  6330.   }
  6331.  
  6332.  
  6333. The color you define is the  way  you  want  the  object  to  look  if  fully
  6334. illuminated. You pick the basic color inherent  in  the  object  and  POV-Ray
  6335. brightens or darkens it depending on the lighting in the scene. The parameter
  6336. is called "pigment" because we  are  defining  the  basic  color  the  object
  6337. actually is rather than how it looks.
  6338.  
  6339. The most complete form for defining a pigment is as follows:
  6340.  
  6341.   pigment {
  6342.     PIGMENT_IDENTIFIER
  6343.     PATTERN_TYPE
  6344.     PIGMENT_MODIFIERS...
  6345.   }
  6346.  
  6347.  
  6348. Each of the items in a pigment are optional but if  they  are  present,  they
  6349. should be in the order  shown  above  to  insure  that  the  results  are  as
  6350. expected. Any items after the PIGMENT_IDENTIFIER modify or override  settings
  6351. given in the identifier. If no identifier is specified then the items  modify
  6352. the pigment values in the current default  texture.  Valid  PIGMENT_MODIFIERS
  6353. are color_map, pigment_map, image_map and quick_color statements as  well  as
  6354. any of the  generic  PATTERN_MODIFIERS  such  as  translate,  rotate,  scale,
  6355. turbulence, wave shape and warp statements. Such modifiers apply only to  the
  6356. pigment and not to other parts of the texture. Modifiers should be  specified
  6357. last.
  6358.  
  6359. The various PATTERN_TYPEs fall into roughly 4 categories.  Each  category  is
  6360. discussed below. They are solid color,  color  list  patterns,  color  mapped
  6361. patterns and image maps.
  6362.  
  6363. 3.6.1.1          Solid Color Pigments
  6364.  
  6365. The simplest type of pigment is a solid color. To specify a solid  color  you
  6366. simply put a color specification inside a pigment. For example:
  6367.  
  6368.   pigment {color Orange}
  6369.  
  6370.  
  6371. A color specification consists of the option  keyword  color  followed  by  a
  6372. color identifier or by a specification of the amount  of  red,  green,  blue,
  6373. filtered and unfiltered transparency in the surface. See section  "Specifying
  6374. Colors" for more details about colors. Any  pattern  modifiers  used  with  a
  6375. solid color are ignored because there is no pattern to modify.
  6376.  
  6377. 3.6.1.2          Color List Pigments
  6378.  
  6379. There are three color list patterns: checker, hexagon and brick.  The  result
  6380. is a pattern of solid colors with distinct edges rather than  a  blending  of
  6381. colors as with color mapped patterns. Each of these patterns  is  covered  in
  6382. more detail in a later section. The syntax for each is:
  6383.  
  6384.   pigment { brick COLOR1, COLOR2 MODIFIERS ... }
  6385.   pigment { checker COLOR1, COLOR2 MODIFIERS ... }
  6386.   pigment { hexagon COLOR1, COLOR2, COLOR3 MODIFIERS ... }
  6387.  
  6388.  
  6389. Each COLORn is any valid color specification. There should be a comma between
  6390. each color or the color keyword should be used as a separator so that POV-Ray
  6391. can determine where each color specification starts and ends.
  6392.  
  6393. 3.6.1.3          Color Maps
  6394.  
  6395. Most of the color patterns do not use abrupt color changes  of  just  two  or
  6396. three colors like those in the  brick,  checker  or  hexagon  patterns.  They
  6397. instead use smooth transitions of many colors that gradually change from  one
  6398. point to the next. The colors are defined in  a  pigment  modifier  called  a
  6399. color map that describes how the pattern blends from one color to the next.
  6400.  
  6401. Each of the various  pattern  types  available  is  in  fact  a  mathematical
  6402. function that takes any x,y,z location and turns it into a number between 0.0
  6403. and 1.0 inclusive. That number is used to specify what mix of colors  to  use
  6404. from the color map.
  6405.  
  6406. A color map is specified by...
  6407.  
  6408.   pigment{
  6409.     PATTERN_TYPE
  6410.     color_map {
  6411.       [ NUM_1 COLOR_1]
  6412.       [ NUM_2 COLOR_2]
  6413.       [ NUM_3 COLOR_3]
  6414.        ...
  6415.     }
  6416.     PIGMENT_MODIFIERS...
  6417.   }
  6418.  
  6419.  
  6420. Where NUM_1, NUM_2...  are  float  values  between  0.0  and  1.0  inclusive.
  6421. COLOR_1, COLOR_2... are color specifications. NOTE: the [] brackets are  part
  6422. of the actual statement. They are not notational  symbols  denoting  optional
  6423. parts. The brackets surround each entry in the color map. There may be from 2
  6424. to 256 entries in the map. The alternate spelling colour_map may be used.
  6425.  
  6426. For example,
  6427.  
  6428.   sphere {
  6429.     <0,1,2>, 2
  6430.     pigment {
  6431.       gradient x       //this is the PATTERN_TYPE
  6432.       color_map {
  6433.         [0.1  color Red]
  6434.         [0.3  color Yellow]
  6435.         [0.6  color Blue]
  6436.         [0.6  color Green]
  6437.         [0.8  color Cyan]
  6438.       }
  6439.     }
  6440.   }
  6441.  
  6442.  
  6443. The pattern function is evaluated and the result is a value from 0.0 to  1.0.
  6444. If the value is less than the first entry (in this case 0.1) then  the  first
  6445. color (Red) is used. Values from 0.1 to 0.3 use a blend  of  red  and  yellow
  6446. using linear interpolation of the two colors. Similarly values  from  0.3  to
  6447. 0.6 blend from yellow to blue. Note that the 3rd and 4th  entries  both  have
  6448. values of 0.6. This causes an immediate abrupt shift of color  from  blue  to
  6449. green. Specifically a value that is less than 0.6 will be  blue  but  exactly
  6450. equal to 0.6 will be green. Moving along, values from 0.6 to 0.8  will  be  a
  6451. blend of green and cyan. Finally any value greater than or equal to 0.8  will
  6452. be cyan.
  6453.  
  6454. If you want areas of unchanging color you simply specify the same  color  for
  6455. two adjacent entries. For example:
  6456.  
  6457.   color_map {
  6458.     [0.1  color Red]
  6459.     [0.3  color Yellow]
  6460.     [0.6  color Yellow]
  6461.     [0.8  color Green]
  6462.   }
  6463.  
  6464.  
  6465. In this case any value from 0.3 to 0.6 will be pure yellow.
  6466.  
  6467. A color_map may be used with any pattern except brick, checker,  hexagon  and
  6468. image_map.
  6469.  
  6470. You may declare and use color_map identifiers. For example:
  6471.  
  6472.   #declare Rainbow_Colors=
  6473.     color_map {
  6474.       [0.0   color Magenta]
  6475.       [0.33  color Yellow]
  6476.       [0.67  color Cyan]
  6477.       [1.0   color Magenta]
  6478.     }
  6479.  
  6480.   object{My_Object
  6481.     pigment{
  6482.       gradient x
  6483.       color_map{Rainbow_Colors}
  6484.     }
  6485.   }
  6486.  
  6487.  
  6488. 3.6.1.4          Pigment Maps
  6489.  
  6490. In addition to specifying blended color with a color_map, you  may  create  a
  6491. blend of pigments using a  pigment_map.  The  syntax  for  a  pigment_map  is
  6492. identical color_map except you specify a pigment in each map entry.
  6493.  
  6494. A pigment_map is specified by...
  6495.  
  6496.   pigment{
  6497.     PATTERN_TYPE
  6498.     pigment_map {
  6499.       [ NUM_1 PIGMENT_BODY_1]
  6500.       [ NUM_2 PIGMENT_BODY_2]
  6501.       [ NUM_3 PIGMENT_BODY_3]
  6502.        ...
  6503.     }
  6504.     PIGMENT_MODIFIERS...
  6505.   }
  6506.  
  6507.  
  6508. Where NUM_1, NUM_2... are float values  between  0.0  and  1.0  inclusive.  A
  6509. PIGMENT_BODY is anything that would normally appear inside  a  pigment  {...}
  6510. statement but the pigment keyword and {} braces are not needed. NOTE: the  []
  6511. brackets are part of the actual statement. They are  not  notational  symbols
  6512. denoting optional parts. The brackets surround each entry in the  map.  There
  6513. may be from 2 to 256 entries in the map.
  6514.  
  6515. For example,
  6516.  
  6517.   sphere {
  6518.     <0,1,2>, 2
  6519.     pigment {
  6520.       gradient x       //this is the PATTERN_TYPE
  6521.       pigment_map {
  6522.         [0.3 wood scale 0.2]
  6523.         [0.3 Jade]    //this is a pigment identifier
  6524.         [0.6 Jade]
  6525.         [0.9 marble turbulence 1]
  6526.       }
  6527.     }
  6528.   }
  6529.  
  6530.  
  6531. When the gradient x function returns values from 0.0 to 0.3 the  scaled  wood
  6532. pigment is used. From 0.3 to 0.6 the pigment identifier Jade  is  used.  From
  6533. 0.6 up to 0.9 a blend of Jade and a turbulent marble is used. From 0.9 on  up
  6534. only the turbulent marble is used.
  6535.  
  6536. Pigment maps may be nested  to  any  level  of  complexity  you  desire.  The
  6537. pigments in a map may have color_map or pigment_maps or any type  of  pigment
  6538. you want. Any entry of a pigment_map may be a  solid  color  however  if  all
  6539. entries are solid colors  you  should  use  a  color_map  which  will  render
  6540. slightly faster.
  6541.  
  6542. Entire pigments may also be used with the block  patterns  such  as  checker,
  6543. hexagon and brick. For example...
  6544.  
  6545.   pigment {
  6546.     checker
  6547.     pigment { Jade scale .8 }
  6548.     pigment { White_Marble scale .5 }
  6549.   }
  6550.  
  6551.  
  6552. Note that in the case of  block  patterns,  the  pigment  {...}  wrapping  is
  6553. required around the pigment information.
  6554.  
  6555. A pigment_map is also used with the average pigment type. See  "Average"  for
  6556. details.
  6557.  
  6558. You may not use pigment_map or individual pigments  with  an  image_map.  See
  6559. "texture_map" for an alternative way to do this.
  6560.  
  6561. 3.6.1.5          Image Maps
  6562.  
  6563. When all else fails and none of the above pigment pattern  types  meets  your
  6564. needs, you can use an image map to wrap a 2-D bit-mapped  image  around  your
  6565. 3-D objects.
  6566.  
  6567. 3.6.1.5.1        Specifying an Image Map
  6568.  
  6569. The syntax for image_map is...
  6570.  
  6571.   pigment {
  6572.     image_map {
  6573.       FILE_TYPE "filename"
  6574.       MODIFIERS...
  6575.     }
  6576.   }
  6577.  
  6578.  
  6579. Where FILE_TYPE is one of the following keywords gif,  tga,  iff,  ppm,  pgm,
  6580. png, or sys. This is followed by the name of  the  file  in  quotes.  Several
  6581. optional modifiers may follow  the  file  specification.  The  modifiers  are
  6582. described below. Note: Earlier versions of  POV-Ray  allowed  some  modifiers
  6583. before the FILE_TYPE but that syntax is being phased  out  in  favor  of  the
  6584. syntax described here.
  6585.  
  6586. Filenames specified in the image_map statements will be searched for  in  the
  6587. home (current) directory first, and if not found, will then be  searched  for
  6588. in directories specified by any "-L"  (library  path)  options  active.  This
  6589. would  facilitate  keeping  all  your  image  maps  files  in   a   separate
  6590. subdirectory, and giving an "-L" option on the command  line  to  where  your
  6591. library of image maps are.
  6592.  
  6593. By default, the image is mapped onto the X-Y plane. The image is  "projected"
  6594. onto the object as though there were a slide projector somewhere  in  the  -Z
  6595. direction. The image exactly fills the square area from x,y coordinates (0,0)
  6596. to (1,1) regardless of the image's original size in pixels. If you would like
  6597. to change this default, you may translate, rotate or  scale  the  pigment  or
  6598. texture to map it onto the object's surface as desired.
  6599.  
  6600. In the section "Checker" we explained checker pigment patterns, we  described
  6601. the checks as solid cubes of colored clay from which objects are carved. With
  6602. image maps you should imagine that  each  pixel  is  a  long,  thin,  square,
  6603. colored rod that extends parallel to the Z axis. The image is made from  rows
  6604. and columns of these rods bundled together and the object is then carved from
  6605. the bundle.
  6606.  
  6607. If you would like to change this  default  orientation,  you  may  translate,
  6608. rotate or scale the pigment or texture to map it onto the object's surface as
  6609. desired.
  6610.  
  6611. 3.6.1.5.2        The map_type Option
  6612.  
  6613. The default projection of the image onto the X-Y plane is  called  a  "planar
  6614. map type". This option may  be  changed  by  adding  the  "map_type"  keyword
  6615. followed by a number specifying the way to wrap the image around the  object.
  6616.  
  6617.  
  6618. A "map_type 0" gives the default planar mapping already described.
  6619.  
  6620. A "map_type 1" is a spherical mapping. It assumes that the object is a sphere
  6621. of any size sitting at the origin. The Y axis is the north/south pole of  the
  6622. spherical mapping. The top and bottom edges of the image just touch the  pole
  6623. regardless of any scaling. The left edge of the image begins at the  positive
  6624. X axis and wraps the image around the sphere from "west" to "east"  in  a  -Y
  6625. rotation. The image covers the sphere exactly once. The "once" keyword has no
  6626. meaning for this type.
  6627.  
  6628. With "map_type 2" you get a cylindrical mapping. It assumes that  a  cylinder
  6629. of any diameter lies along the Y axis. The image wraps  around  the  cylinder
  6630. just like the spherical map but the image remains 1 unit  tall  from  y=0  to
  6631. y=1. This band of color is repeated at all heights unless the "once"  keyword
  6632. is applied.
  6633.  
  6634. Finally "map_type 5" is a torus or donut shaped mapping. It  assumes  that  a
  6635. torus of major radius 1 sits at the origin in the X-Z  plane.  The  image  is
  6636. wrapped around similar to spherical or cylindrical maps. However the top  and
  6637. bottom edges of the map wrap over and under the torus where  they  meet  each
  6638. other on the inner rim.
  6639.  
  6640. Types 3 and 4 are still under development.
  6641.  
  6642. Note: The "map_type" option may also be applied to bump_map and  material_map
  6643. statements.
  6644.  
  6645. 3.6.1.5.3        The Filter and Transmit Bitmap Modifiers
  6646.  
  6647. To make all or part of an image  map  transparent,  you  can  specify  filter
  6648. and/or transmit values for the color palette/registers of  PNG,  GIF  or  IFF
  6649. pictures (at least for the modes that use  palettes).  You  can  do  this  by
  6650. adding the keyword filter or transmit following the filename. The keyword  is
  6651. followed by two numbers. The first number is the palette number value and the
  6652. second is the amount of transparency. The values should  be  separated  by  a
  6653. comma. For example:
  6654.  
  6655.   image_map {
  6656.     gif "mypic.gif"
  6657.     filter   0, 0.5 // Make color 0 50% filtered transparent
  6658.     filter   5, 1.0 // Make color 5 100% filtered transparent
  6659.     transmit 8, 0.3 // Make color 8 30% non-filtered transparent
  6660.   }
  6661.  
  6662.  
  6663. You can give the entire image a filter or transmit  value  using  filter  all
  6664. VALUE or transmit all VALUE .
  6665.  
  6666. For example:
  6667.  
  6668.   image_map {
  6669.     gif "stnglass.gif"
  6670.     filter all 0.9
  6671.   }
  6672.  
  6673.  
  6674. Note: Early versions of POV-Ray used the keyword alpha  to  specify  filtered
  6675. transparency  however  that  word  is  often  used  to  descrbe  non-filtered
  6676. transparency. For this reason, alpha is no longer used.
  6677.  
  6678. See "filter" and "transmit" for details on the differences  between  filtered
  6679. and non-filtered transparency.
  6680.  
  6681. 3.6.1.5.4        Using the Alpha Channel
  6682.  
  6683. Another way to specify non-filtered transmit transparency in an image map  is
  6684. by using the alpha channel .
  6685.  
  6686. PNG allows you to store a different transparency for each color index in  the
  6687. PNG file, if desired. If your paint programs support this feature of PNG, you
  6688. can do the  transparency  editing  within  your  paint  program  rather  than
  6689. specifying transmit values for each color in the POV file. Since PNG and  TGA
  6690. image formats can also store full alpha channel  (transparency)  information,
  6691. you can generate image maps that have transparency which isn't  dependent  on
  6692. the color of a pixel, but rather its location in the image.
  6693.  
  6694. Although POV uses transmit 0.0 to specify no transparency and 1.0 to  specify
  6695. full transparency, the alpha data ranges  from  0  to  255  in  the  opposite
  6696. direction. Alpha data 0 means the same as transmit 1.0  and  alpha  data  255
  6697. produces transmit 0.0.
  6698.  
  6699. 3.6.1.6          Quick Color
  6700.  
  6701. When developing POV-Ray scenes its often useful to do low quality  test  runs
  6702. that render faster. The +Q command line switch can be used to turn  off  some
  6703. time consuming color pattern and lighting calculations to  speed  things  up.
  6704. However all settings of +Q5 or  lower  turns  off  pigment  calculations  and
  6705. creates gray objects.
  6706.  
  6707. By adding a "quick_color" to a pigment you tell POV-Ray what solid  color  to
  6708. use for quick renders instead of a patterned pigment. For example:
  6709.  
  6710.   pigment {
  6711.     gradient x
  6712.     color_map{
  6713.       [0.0 color Yellow]
  6714.       [0.3 color Cyan]
  6715.       [0.6 color Magenta]
  6716.       [1.0 color Cyan]
  6717.     }
  6718.     turbulence 0.5
  6719.     lambda 1.5
  6720.     omega 0.75
  6721.     octaves 8
  6722.     quick_color Neon_Pink
  6723.   }
  6724.  
  6725.  
  6726. This tells POV-Ray to use solid Neon_Pink for test runs  at  quality  +Q5  or
  6727. lower but to use the turbulent gradient pattern  for  rendering  at  +Q6  and
  6728. higher.
  6729.  
  6730. Note that solid color pigments such as
  6731.  
  6732.   pigment {color Magenta}
  6733.  
  6734.  
  6735. automatically set the quick_color to that value. You may override this if you
  6736. want. Suppose you have 10 spheres on the screen and all are  Yellow.  If  you
  6737. want  to  identify  them  individually  you  could  give  each  a  different
  6738. quick_color like this:
  6739.  
  6740.   sphere { <1,2,3>,4
  6741.            pigment { color Yellow  quick_color Red }
  6742.          }
  6743.  
  6744.   sphere { <-1,-2,-3>,4
  6745.            pigment { color Yellow  quick_color Blue }
  6746.          }
  6747.  
  6748.  
  6749. and so on. At +Q6 or higher they will all be Yellow but at +Q5 or lower  each
  6750. would be different colors so you could identify them.
  6751.  
  6752. 3.6.2            Normal
  6753.  
  6754. Ray tracing is known for the dramatic way it depicts  reflection,  refraction
  6755. and lighting effects. Much  of  our  perception  depends  on  the  reflective
  6756. properties of an object. Ray tracing can exploit this by  playing  tricks  on
  6757. our perception to make us see complex details that aren't really there.
  6758.  
  6759. Suppose you wanted a very bumpy surface on  the  object.  It  would  be  very
  6760. difficult to mathematically model lots of bumps. We can however simulate  the
  6761. way bumps look by altering  the  way  light  reflects  off  of  the  surface.
  6762. Reflection calculations depend on a vector called a "surface normal"  vector.
  6763. This is a vector which points away from the surface and is  perpendicular  to
  6764. it. By artificially modifying (or perturbing)  this  normal  vector  you  can
  6765. simulate bumps.
  6766.  
  6767. The normal {...} statement is the part of a texture which defines the pattern
  6768. of normal perturbations  to  be  applied  to  an  object.  Like  the  pigment
  6769. statement, you can omit the surrounding texture block to save typing. Do  not
  6770. forget however that there is a texture implied. For example...
  6771.  
  6772.   //this...                    //can be shortened to this...
  6773.  
  6774.   object {                     object {
  6775.     My_Object                    My_Object
  6776.     texture {                    pigment {color Purple}
  6777.       pigment {color Purple}     normal {bumps 0.3}
  6778.       normal {bumps 0.3}       }
  6779.     }
  6780.   }
  6781.  
  6782.  
  6783. Note that attaching a normal pattern does not really modify the  surface.  It
  6784. only affects the way light reflects or refracts at the  surface  so  that  it
  6785. looks bumpy.
  6786.  
  6787. The most complete form for defining a normal is as follows:
  6788.  
  6789.   normal {
  6790.     NORMAL_IDENTIFIER
  6791.     PATTERN_TYPE FloatValue
  6792.     NORMAL_MODIFIERS
  6793.     TRANSFORMATIONS...
  6794.   }
  6795.  
  6796.  
  6797. Each of the items in a normal are optional but  if  they  are  present,  they
  6798. should be in the order  shown  above  to  insure  that  the  results  are  as
  6799. expected. Any items after the NORMAL_IDENTIFIER modify or  override  settings
  6800. given in the identifier. If no identifier is specified then the items  modify
  6801. the normal values in  the  current  default  texture.  The  PATTERN_TYPE  may
  6802. optionally be followed by a float value that controls the apparent  depth  of
  6803. the bumps. Typical values range from 0.0 to 1.0 but any value  may  be  used.
  6804. Negative values invert the pattern. The default value if none is specified is
  6805. 0.5.
  6806.  
  6807. Valid NORMAL_MODIFIERS are  slope_map,  normal_map,  bump_map  and  bump_size
  6808. statements as well as any of the generic PATTERN_MODIFIERS such as translate,
  6809. rotate, scale, turbulence, wave shape and  warp  statements.  Such  modifiers
  6810. apply only to the normal and not to other parts  of  the  texture.  Modifiers
  6811. should be specified last.
  6812.  
  6813. There are 3 basic types of NORMAL_PATTERN_TYPEs. They  are  pattern  normals,
  6814. specialized normals and bump_map. They differ in the types of  modifiers  you
  6815. may  use  with  them.  Originally  POV-Ray  had  some  patterns  which  were
  6816. exclusively used for pigments while others were exclusively used for normals.
  6817. New in POV-Ray 3.0 you can use any pattern for either  pigments  or  normals.
  6818. For example it is now valid to use ripples as a pigment or wood as  a  normal
  6819. type. The patterns bumps, dents, ripples, waves, wrinkles and  bump_map  were
  6820. once exclusively normal patterns which could not be used as pigments. Because
  6821. these 6 types use specialized normal modification calculations,  they  cannot
  6822. have slope_map, normal_map or wave shape modifiers. All other normal  pattern
  6823. types may use them.
  6824.  
  6825. 3.6.2.1          Slope Maps
  6826.  
  6827. A slope_map is a normal pattern modifier which gives the user a great deal of
  6828. control over the exact shape of the bumpy features. It  is  best  illustrated
  6829. with a gradient normal pattern. Suppose you have...
  6830.  
  6831.   plane{z,0
  6832.     pigment{White}
  6833.     normal {gradient x}
  6834.   }
  6835.  
  6836.  
  6837. this gives a ramp wave pattern that looks like small linear ramps that  climb
  6838. from the points at x=0 to x=1 and then abruptly drops to 0  again  to  repeat
  6839. the ramp from x=1 to x=2. A slope_map turns  this  simple  linear  ramp  into
  6840. almost any wave shape you want. The syntax is as follows...
  6841.  
  6842.   normal{
  6843.     PATTERN_TYPE Value
  6844.     slope_map {
  6845.       [ NUM_1 POINT_SLOPE_1]
  6846.       [ NUM_2 POINT_SLOPE_2]
  6847.       [ NUM_3 POINT_SLOPE_3]
  6848.        ...
  6849.     }
  6850.     NORMAL_MODIFIERS...
  6851.   }
  6852.  
  6853.  
  6854. NOTE: the [] brackets  are  part  of  the  actual  statement.  They  are  not
  6855. notational symbols denoting optional parts. The brackets surround each  entry
  6856. in the slope map. There may be from 2 to 256 entries in the map.
  6857.  
  6858. The  NUM_1,  NUM_2...  are  float  values  between  0.0  and  1.0  inclusive.
  6859. POINT_SLOPE_1, POINT_SLOPE__2... are 2 component vectors such as <0,1>  where
  6860. the first value represents the apparent height of the  wave  and  the  second
  6861. value represents the slope of the wave at that point. The height should range
  6862. between 0.0 and 1.0 but any value could be used.
  6863.  
  6864. The slope value is the change in height per unit of distance. For  example  a
  6865. slope of zero means flat, a slope of 1.0 means slope upwards at a  45  degree
  6866. angle, and a slope of -1 means slope down  at  45  degrees.  Theoretically  a
  6867. slope straight up would have infinite slope. In practice, slope values should
  6868. be kept in the range -3.0 to +3.0.  Keep  in  mind  that  this  is  only  the
  6869. visually apparent slope. A normal does not actually change the surface.
  6870.  
  6871. For example here is how to make the ramp slope up for the first half and back
  6872. down on the second half creating a triangle wave with a  sharp  peak  in  the
  6873. center.
  6874.  
  6875.   normal {
  6876.     gradient x       //this is the PATTERN_TYPE
  6877.     slope_map {
  6878.       [0   <0, 1>]   // start at bottom and slope up
  6879.       [0.5 <1, 1>]   // halfway through reach top still climbing
  6880.       [0.5 <1,-1>]   // abruptly slope down
  6881.       [1   <0,-1>]   // finish on down slope at bottom
  6882.     }
  6883.   }
  6884.  
  6885.  
  6886. The pattern function is evaluated and the result is a value from 0.0 to  1.0.
  6887. The first entry says that at x=0, the apparent height is 0 and the  slope  is
  6888. 1. At x=0.5 we are at height 1 and slope is still up at 1.  The  third  entry
  6889. also specifies that at x=0.5 (actually at some tiny fraction  above  0.5)  we
  6890. have height 1 but slope -1 which is downwards.  Finally  at  x=1  we  are  at
  6891. height 0 again and still sloping down with slope -1.
  6892.  
  6893. Although this example connects the points using straight lines, the shape  is
  6894. actually a cubic spline. This example creates a smooth sine wave.
  6895.  
  6896.   normal {
  6897.     gradient x          //this is the PATTERN_TYPE
  6898.     slope_map {
  6899.       [0    <0.5, 1>]   // start in middle and slope up
  6900.       [0.25 <1.0, 0>]   // flat slope at top of wave
  6901.       [0.5  <0.5,-1>]   // slope down at mid point
  6902.       [0.75 <0.0, 0>]   // flat slope at bottom
  6903.       [1    <0.5, 1>]   // finish in middle and slope up
  6904.     }
  6905.   }
  6906.  
  6907.  
  6908. This example starts at height 0.5 sloping up at slope 1. At a fourth  of  the
  6909. way through we are at the top of the curve at height 1 with slope 0 which  is
  6910. flat. The space between these two is a gentle curve because the start and end
  6911. slopes are different. At half way we are  at  half  height  sloping  down  to
  6912. bottom out at 3/4ths. By the end we are climbing at slope 1 again to complete
  6913. the cycle.
  6914.  
  6915. There are more examples in SLOPEMAP.POV in the sample scenes.
  6916.  
  6917. A slope_map may be used with any  pattern  except  brick,  checker,  hexagon,
  6918. bumps, dents, ripples, waves, wrinkles and bump_map.
  6919.  
  6920. You may declare and use slope_map identifiers. For example:
  6921.  
  6922.   #declare Fancy_Wave=
  6923.     slope_map {       // Now let's get fancy
  6924.       [0.0  <0, 1>]   // Do tiny triangle here
  6925.       [0.2  <1, 1>]   //  down
  6926.       [0.2  <1,-1>]   //     to
  6927.       [0.4  <0,-1>]   //       here.
  6928.       [0.4  <0, 0>]   // Flat area
  6929.       [0.5  <0, 0>]   //   through here.
  6930.       [0.5  <1, 0>]   // Square wave leading edge
  6931.       [0.6  <1, 0>]   //   trailing edge
  6932.       [0.6  <0, 0>]   // Flat again
  6933.       [0.7  <0, 0>]   //   through here.
  6934.       [0.7  <0, 3>]   // Start scallop
  6935.       [0.8  <1, 0>]   //   flat on top
  6936.       [0.9  <0,-3>]   //     finish here.
  6937.       [0.9  <0, 0>]   // Flat remaining through 1.0
  6938.     }
  6939.  
  6940.   object{My_Object
  6941.     pigment{White}
  6942.     normal{
  6943.       wood
  6944.       slope_map{Fancy_Wave}
  6945.     }
  6946.   }
  6947.  
  6948.  
  6949. 3.6.2.2          Normal Maps
  6950.  
  6951. Most of the time you will apply single normal pattern to  an  entire  surface
  6952. but you may also create a pattern or blend of normals using a normal_map. The
  6953. syntax for a normal_map is identical to  pigment_map  except  you  specify  a
  6954. normal in each map entry.
  6955.  
  6956. A normal_map is specified by...
  6957.  
  6958.   normal{
  6959.     PATTERN_TYPE
  6960.     normal_map {
  6961.       [ NUM_1 NORMAL_BODY_1]
  6962.       [ NUM_2 NORMAL_BODY_2]
  6963.       [ NUM_3 NORMAL_BODY_3]
  6964.        ...
  6965.     }
  6966.     NORMAL_MODIFIERS...
  6967.   }
  6968.  
  6969.  
  6970. Where NUM_1, NUM_2... are float values  between  0.0  and  1.0  inclusive.  A
  6971. NORMAL_BODY is anything that would normally  appear  inside  a  normal  {...}
  6972. statement but the normal keyword and {} braces are not needed. NOTE:  the  []
  6973. brackets are part of the actual statement. They are  not  notational  symbols
  6974. denoting optional parts. The brackets surround each entry in the  map.  There
  6975. may be from 2 to 256 entries in the map.
  6976.  
  6977. For example,
  6978.  
  6979.   normal {
  6980.     gradient x       //this is the PATTERN_TYPE
  6981.     normal_map {
  6982.       [0.3  bumps scale 2]
  6983.       [0.3  dents]
  6984.       [0.6  dents]
  6985.       [0.9  marble turbulence 1]
  6986.     }
  6987.   }
  6988.  
  6989.  
  6990. When the gradient x function returns values from 0.0 to 0.3 then  the  scaled
  6991. bumps normal is used. From 0.3 to 0.6 dents are From 0.6 up to 0.9 a blend of
  6992. dents and a turbulent marble is used. From  0.9  on  up  only  the  turbulent
  6993. marble is used.
  6994.  
  6995. Normal maps may be nested to any level of complexity you desire. The  normals
  6996. in a map may have slope_map or normal_maps or any type of normal you want.
  6997.  
  6998. A normal_map is also used with the average normal  type.  See  "Average"  for
  6999. details.
  7000.  
  7001. Entire normals may also be used with the  block  patterns  such  as  checker,
  7002. hexagon and brick. For example...
  7003.  
  7004.   normal {
  7005.     checker
  7006.       normal{gradient x scale .2}
  7007.       normal{gradient y scale .2}
  7008.     }
  7009.   }
  7010.  
  7011.  
  7012. Note that in the case  of  block  patterns,  the  normal  {...}  wrapping  is
  7013. required around the normal information.
  7014.  
  7015. You may not use  normal_map  or  individual  normals  with  a  bump_map.  See
  7016. "texture_map" for an alternative way to do this.
  7017.  
  7018. 3.6.2.3          Bump Maps
  7019.  
  7020. When all else fails and none of the above normal  pattern  types  meets  your
  7021. needs, you can use a bump map to wrap a 2-D bit-mapped  bump  pattern  around
  7022. your 3-D objects.
  7023.  
  7024. Instead of placing the color of the image on the  shape  like  an  image_map,
  7025. bump_map perturbs the surface normal based on the color of the image at  that
  7026. point. The result looks like the image has been embossed into the surface. By
  7027. default, bump_map uses the brightness of  the  actual  color  of  the  pixel.
  7028. Colors are converted to gray  scale  internally  before  calculating  height.
  7029. Black is a low spot, white is a high spot. The image's index  values  may  be
  7030. used instead (see use_index) below.
  7031.  
  7032. 3.6.2.3.1        Specifying a Bump Map
  7033.  
  7034. The syntax for bump_map is...
  7035.  
  7036.   normal {
  7037.     bump_map {
  7038.       FILE_TYPE "filename"
  7039.       BITMAP_MODIFIERS...
  7040.     }
  7041.     NORMAL_MODIFIERS...
  7042.   }
  7043.  
  7044.  
  7045. Where FILE_TYPE is one of the following keywords gif,  tga,  iff,  ppm,  pgm,
  7046. png, or sys. This is followed by the name of the file using any valid  string
  7047. expression. Several optional modifiers may follow the file specification. The
  7048. modifiers are described below. Note: Earlier versions of POV-Ray allowed some
  7049. modifiers before the FILE_TYPE but that syntax is being phased out  in  favor
  7050. of the syntax described here.
  7051.  
  7052. Filenames specified in the bump_map statements will be searched  for  in  the
  7053. home (current) directory first, and if not found, will then be  searched  for
  7054. in directories specified by any +L switches or  Library_Path=  options.  This
  7055. would facilitate keeping all your bump maps files in a separate subdirectory,
  7056. and specifying a library path to them. Note that any operating system default
  7057. paths are not searched unless you also specify them as a Library_Path.
  7058.  
  7059. By default, the bump pattern is mapped onto the  X-Y  plane.  The  bumps  are
  7060. "projected" onto the object as though there were a slide projector  somewhere
  7061. in the -Z direction. The bump pattern exactly fills the square area from  x,y
  7062. coordinates (0,0) to (1,1) regardless  of  the  bitmaps's  original  size  in
  7063. pixels. If you would like to change this default, you may  translate,  rotate
  7064. or scale the normal or texture  to  map  it  onto  the  object's  surface  as
  7065. desired.
  7066.  
  7067. The file name is optionally followed by one  or  more  BITMAP_MODIFIERS.  The
  7068. bump_size, use_color and use_index modifiers are specific to  bump  maps  and
  7069. are discussed in the following sections. See  "bitmap  modifiers"  for  other
  7070. general bitmap modifiers.
  7071.  
  7072. After a bump_map statement but still inside  the  normal  statement  you  may
  7073. apply any legal normal modifiers except slope_map and pattern wave forms.
  7074.  
  7075. 3.6.2.3.2        Bump_Size
  7076.  
  7077. The relative bump size can be scaled using bump_size modifier. The  bump_size
  7078. number can be any number other than 0 but typical values are from  about  0.1
  7079. to as high as 4.0 or 5.0.
  7080.  
  7081.   normal {
  7082.     bump_map {
  7083.       gif "stuff.gif"
  7084.       bump_size 5.0
  7085.     }
  7086.   }
  7087.  
  7088.  
  7089. Originally bump_size could only be used inside bump_map but  it  can  now  be
  7090. used with any normal. Typically it is used to override a  previously  defined
  7091. size. For example:
  7092.  
  7093.   normal {
  7094.     My_Normal   //this is a previously defined normal identifier
  7095.     bump_size 2.0
  7096.   }
  7097.  
  7098.  
  7099. 3.6.2.3.3        Use_Index and Use_Color
  7100.  
  7101. Usually the bump_map converts the color of the pixel in the  map  to  a  gray
  7102. scale intensity value in the range 0.0 to 1.0 and calculates the bumps  based
  7103. on that value. If you  specify  use_index,  the  bump_map  uses  the  color's
  7104. palette number to compute as the height of the bump at that point. So,  color
  7105. #0 would be low and color #255 would be high. The actual color of the  pixels
  7106. doesn't matter when using the index. This option is only available on palette
  7107. based formats. The use_color keyword may be specified to explicitly note that
  7108. the color methods should be used instead. The alternate  spelling  use_colour
  7109. is also  valid.  These  modifiers  may  only  be  used  inside  the  bump_map
  7110. statement.
  7111.  
  7112. 3.6.3            Finish
  7113.  
  7114. The finish properties of a surface can greatly  affect  its  appearance.  How
  7115. does light reflect? What happens when light  passes  through?  What  kind  of
  7116. highlights  are  visible.  To  answer  these  questions  you  need  a  finish
  7117. statement.
  7118.  
  7119. The "finish {...}" statement is the part  of  a  texture  which  defines  the
  7120. various finish properties to be applied to an object.  Like  the  pigment  or
  7121. normal statement, you can omit the surrounding texture block to save  typing.
  7122. Do not forget however that there is a texture implied. For example...
  7123.  
  7124.   this...                            can be shortened to this...
  7125.  
  7126.   object {                           object {
  7127.     My_Object                          My_Object
  7128.     texture {                          pigment {color Purple}
  7129.       pigment {color Purple}           finish {phong 0.3}
  7130.       finish {phong 0.3}             }
  7131.     }
  7132.   }
  7133.  
  7134.  
  7135. The most complete form for defining a finish is as follows:
  7136.  
  7137.   finish {
  7138.     FINISH_IDENTIFIER
  7139.     [ ambient COLOR ]
  7140.     [ diffuse FLOAT ]
  7141.     [ brilliance FLOAT ]
  7142.     [ phong FLOAT ]
  7143.     [ phong_size FLOAT ]
  7144.     [ specular FLOAT ]
  7145.     [ roughness FLOAT ]
  7146.     [ metallic [ BOOL ] ]
  7147.     [ reflection COLOR ]
  7148.     [ refraction FLOAT ]
  7149.     [ ior FLOAT ]
  7150.     [ caustics FLOAT ]
  7151.     [ fade_distance FLOAT ]
  7152.     [ fade_power FLOAT ]
  7153.     [ irid { thickness FLOAT turbulence VECTOR } ]
  7154.     [ crand FLOAT ]
  7155.   }
  7156.  
  7157.  
  7158. The FINISH_IDENTIFIER is optional but should proceed  all  other  items.  Any
  7159. items after the FINISH_IDENTIFIER modify or override settings  given  in  the
  7160. IDENTIFIER. If no identifier is specified then the items  modify  the  finish
  7161. values in the current default texture.  Note  that  transformations  are  not
  7162. allowed inside a  finish  because  finish  items  cover  the  entire  surface
  7163. uniformly.
  7164.  
  7165. 3.6.3.1          Ambient
  7166.  
  7167. The light you see in dark shadowed areas comes from diffuse reflection off of
  7168. other objects. This light cannot  be  directly  modeled  using  ray  tracing.
  7169. However we can use a trick called "ambient lighting" to  simulate  the  light
  7170. inside a shadowed area.
  7171.  
  7172. Ambient light is light that is scattered everywhere in the room.  It  bounces
  7173. all over the place and manages to light objects up a bit even where no  light
  7174. is directly shining. Computing real ambient light would  take  far  too  much
  7175. time, so we simulate ambient light by adding a small amount of white light to
  7176. each texture whether or not a light is actually shining on that texture.
  7177.  
  7178. This means that the portions of a shape that are completely  in  shadow  will
  7179. still have a little bit of their surface color. It's almost as if the texture
  7180. glows, though the ambient light in a texture only affects  the  shape  it  is
  7181. used on.
  7182.  
  7183. Usually a single float value is specified even though the syntax calls for  a
  7184. color. For example a float value of 0.3  gets  promoted  to  the  full  color
  7185. vector <0.3,0.3,0.3,0.3,0.3> which is acceptible because only the r,g,b parts
  7186. are used.
  7187.  
  7188. The default value is very little ambient light (0.1).  The  value  can  range
  7189. from 0.0 to 1.0. Ambient light affects both shadowed and  non-shadowed  areas
  7190. so if you turn up the ambient value you may want to  turn  down  the  diffuse
  7191. value.
  7192.  
  7193. Note that this method doesn't account for the color of  surrounding  objects.
  7194. If you walk into a room that has red walls, floor and ceiling then your white
  7195. clothing will look pink from the reflected light. POV-Ray's ambient  shortcut
  7196. doesn't account for this. There is also no way to  model  specular  reflected
  7197. indirect illumination such as the flashlight shining in a mirror.
  7198.  
  7199. You may color the ambient light using one of two methods. You may  specify  a
  7200. color rather than a float after the ambient keyword in each finish statement.
  7201. For example
  7202.  
  7203.    finish { ambient rgb <0.3,0.1,0.1> } //a pink ambient
  7204.  
  7205.  
  7206. Also you may specify an overall color for all ambient light using the  global
  7207. ambient_light setting. The actual ambient used is:
  7208.  
  7209.    AMBIENT = FINISH_AMBIENT * GLOBAL_AMBIENT
  7210.  
  7211.  
  7212. 3.6.3.2          Diffuse Reflection Items
  7213.  
  7214. When light reflects off of a surface, the laws of physics say that it  should
  7215. leave the surface at the exact same angle it came in. This is similar to  the
  7216. way a billiard ball bounces off a  bumper  of  a  pool  table.  This  perfect
  7217. reflection is called "specular" reflection. However only very smooth polished
  7218. surfaces reflect light in this way. Most of the time, light reflects  and  is
  7219. scattered in all directions by the roughness of the surface. This  scattering
  7220. is called "diffuse reflection" because the light diffuses  or  spreads  in  a
  7221. variety of directions. It accounts for the majority of the reflected light we
  7222. see.
  7223.  
  7224. In the real world, light may come from any of three  possible  sources.  1)It
  7225. can come directly from actual light sources which are illuminating an object.
  7226. 2)It can bounce from other objects such as mirrors via  specular  reflection.
  7227. For example shine a flashlight onto a mirror.  3)It  can  bounce  from  other
  7228. objects via diffuse reflections. Look at some dark area under a desk or in  a
  7229. corner. Even though a lamp may not directly  illuminate  that  spot  you  can
  7230. still see a little bit because light comes from  diffuse  reflection  off  of
  7231. nearby objects.
  7232.  
  7233. 3.6.3.2.1        Diffuse
  7234.  
  7235. POV-Ray and most other ray tracers can only simulate directly, one  of  these
  7236. three types of illumination. That is the light which comes directly from  the
  7237. light source which diffuses in all directions. The keyword "diffuse" is  used
  7238. in a finish statement to control how much  light  of  this  direct  light  is
  7239. reflected via diffuse reflection. For example:
  7240.  
  7241.   finish {diffuse 0.7}
  7242.  
  7243.  
  7244. means that 70% of the light seen comes from direct  illumination  from  light
  7245. sources. The default value is diffuse 0.6.
  7246.  
  7247. 3.6.3.2.2        Brilliance
  7248.  
  7249. The amount of direct light that diffuses from  an  object  depends  upon  the
  7250. angle at which it hits the surface. When light hits at  a  shallow  angle  it
  7251. illuminates less. When it is directly above a surface  it  illuminates  more.
  7252. The "brilliance" keyword can be used in a finish statement to  vary  the  way
  7253. light falls off depending upon the angle  of  incidence.  This  controls  the
  7254. tightness of the basic diffuse illumination on objects and  slightly  adjusts
  7255. the appearance of surface shininess. Objects  may  appear  more  metallic  by
  7256. increasing their brilliance. The default value is 1.0. Higher values from  to
  7257. about 10.0 cause the light to fall off less at medium to  low  angles.  There
  7258. are no limits to the brilliance value. Experiment to see what works best  for
  7259. a particular situation. This is best used in concert with highlighting.
  7260.  
  7261. 3.6.3.2.3        Crand Graininess
  7262.  
  7263. Very rough surfaces, such as concrete or sand, exhibit a dark  graininess  in
  7264. their apparent color. This is caused by the shadows of the pits or  holes  in
  7265. the surface. The "crand" keyword  can  be  added  to  cause  a  minor  random
  7266. darkening the diffuse reflection of direct illumination. Typical values range
  7267. from "crand 0.01" to "crand 0.5" or higher.  The  default  value  is  0.  For
  7268. example:
  7269.  
  7270.   finish {crand 0.05}
  7271.  
  7272.  
  7273. The grain or noise introduced by this feature is applied on a pixel-by- pixel
  7274. basis. This means that it will look the same on far away objects as on  close
  7275. objects. The effect also looks different depending upon  the  resolution  you
  7276. are using for the rendering. For these reasons it is not a very accurate  way
  7277. to model the rough surface effect, but some objects still look better with  a
  7278. little crand thrown in.
  7279.  
  7280. In previous versions of POV-Ray there was no "crand" keyword. Any lone  float
  7281. value found inside a texture {...} which was not preceded by  a  keyword  was
  7282. interpreted as a randomness value.
  7283.  
  7284. NOTE: This should not be used when rendering animations. This is the one of a
  7285. few truly random features in POV-Ray, and will produce an annoying flicker of
  7286. flying pixels on any textures animated with a "crand" value.
  7287.  
  7288. 3.6.3.3          Highlights
  7289.  
  7290. Highlights are the bright spots that appear when a light source reflects  off
  7291. of a smooth object. They are a  blend  of  specular  reflection  and  diffuse
  7292. reflection. They are specular-like because they depend upon viewing angle and
  7293. illumination angle. However they are  diffuse-like  because  some  scattering
  7294. occurs. In order to exactly model a highlight you  would  have  to  calculate
  7295. specular reflection off  of  thousands  of  microscopic  bumps  called  micro
  7296. facets. The more that micro facets are facing the  viewer,  the  shinier  the
  7297. object appears, and the tighter  the  highlights  become.  POV-Ray  uses  two
  7298. different models to simulate highlights  without  calculating  micro  facets.
  7299. They are the specular and phong models.
  7300.  
  7301. Note that specular and phong highlights are NOT  mutually  exclusive.  It  is
  7302. possible to specify both and they will both take effect.  Normally,  however,
  7303. you will only specify one or the other.
  7304.  
  7305. 3.6.3.3.1        Phong Highlights
  7306.  
  7307. The "phong" keyword controls the amount of Phong highlighting on the  object.
  7308. It causes bright shiny spots on the object that are the color  of  the  light
  7309. source being reflected.
  7310.  
  7311. The Phong method measures the average of the  facets  facing  in  the  mirror
  7312. direction from the light sources to the viewer.
  7313.  
  7314. Phong's value is typically  from  0.0  to  1.0,  where  1.0  causes  complete
  7315. saturation to the light source's color at the brightest area (center) of  the
  7316. highlight. The default phong 0.0 gives no highlight.
  7317.  
  7318. The size of the highlight spot is defined by the phong_size value. The larger
  7319. the phong_size, the tighter, or smaller, the highlight and  the  shinier  the
  7320. appearance. The smaller the phong_size, the looser, or larger, the  highlight
  7321. and the less glossy the appearance.
  7322.  
  7323. Typical values range from 1.0 (Very Dull) to 250 (Highly Polished) though any
  7324. values may be used. Default phong_size is 40 (plastic) if phong_size  is  not
  7325. specified. For example:
  7326.  
  7327.   finish {phong 0.9  phong_size 60}
  7328.  
  7329.  
  7330. 3.6.3.3.2        Specular Highlight
  7331.  
  7332. A specular highlight is very similar to Phong highlighting, but uses slightly
  7333. different model. The specular model  more  closely  resembles  real  specular
  7334. reflection and provides a more credible spreading  of  the  highlights  occur
  7335. near the object horizons.
  7336.  
  7337. Specular's value is typically from 0.0 to  1.0,  where  1.0  causes  complete
  7338. saturation to the light source's color at the brightest area (center) of  the
  7339. highlight. The default specular 0.0 gives no highlight.
  7340.  
  7341. The size of the spot is defined by the value  given  for  roughness.  Typical
  7342. values range from 1.0 (Very Rough --- large highlight) to 0.0005 (Very Smooth
  7343. --- small highlight). The default value, if roughness is  not  specified,  is
  7344. 0.05 (Plastic).
  7345.  
  7346. It is possible to specify "wrong" values for roughness that will generate  an
  7347. error when you try to render the file. Don't use 0 and  if  you  get  errors,
  7348. check to see if you are using a very, very small roughness value that may  be
  7349. causing the error. For example:
  7350.  
  7351.   finish {specular 0.9  roughness 0.02}
  7352.  
  7353.  
  7354. 3.6.3.3.3        Metallic Highlight Modifier
  7355.  
  7356. The keyword "metallic" may be used with phong or  specular  highlights.  This
  7357. keyword indicates that the color of the highlights will be  filtered  by  the
  7358. surface color instead of directly using the light_source color. Note that the
  7359. keyword has no numeric value after it. You either have it or you  don't.  For
  7360. example:
  7361.  
  7362.   finish {phong 0.9  phong_size 60  metallic}
  7363.  
  7364.  
  7365. 3.6.3.4          Specular Reflection
  7366.  
  7367. When light does not diffuse and it DOES reflect at the same angle as it  hits
  7368. an object, it is called "specular reflection". Such mirror-like reflection is
  7369. controlled by the "reflection" keyword in a finish statement. For example:
  7370.  
  7371.   finish {reflection 1.0  ambient 0  diffuse 0}
  7372.  
  7373.  
  7374. This gives the object a mirrored finish. It will reflect all  other  elements
  7375. in the scene. Usually a single float value is  specified  after  the  keyword
  7376. even though the syntax calls for a color. For example a float  value  of  0.3
  7377. gets promoted  to  the  full  color  vector  <0.3,0.3,0.3,0.3,0.3>  which  is
  7378. acceptible because only the r,g,b parts are used.
  7379.  
  7380. The value can range from 0.0 to 1.0. By default there is no reflection.
  7381.  
  7382. Adding reflection to a texture makes it take  longer  to  render  because  an
  7383. additional ray  must  be  traced.  The  reflected  light  may  be  tinted  by
  7384. specifying a color rather than a float. For example
  7385.  
  7386.    finish { reflection rgb <0.4,0.4,0.95> } //a light blue tint
  7387.  
  7388.  
  7389. NOTE: Although such reflection is called "specular" it is not  controlled  by
  7390. the POV-Ray "specular" keyword. That keyword controls a "specular" highlight.
  7391.  
  7392.  
  7393. 3.6.3.5          Refraction
  7394.  
  7395. When light passes through a surface either into or out of a dense medium, the
  7396. path of the ray of light is bent. Such bending is called refraction. Normally
  7397. transparent or semi-transparent surfaces in POV-Ray  do  not  refract  light.
  7398. Adding "refraction 1.0" to the finish statement turns on refraction.
  7399.  
  7400. Note: It is recommended that you only use "refraction 0" or  "refraction  1".
  7401. Values in between will darken  the  refracted  light  in  ways  that  do  not
  7402. correspond to any physical property. Many POV-Ray scenes  were  created  with
  7403. intermediate refraction values  before  this  "bug"  was  discovered  so  the
  7404. "feature"  has  been  maintained.  A  more  appropriate  way  to  reduce  the
  7405. brightness of refracted light is to change the "filter" value in  the  colors
  7406. specified in the pigment statement. Note  also  that  "refraction"  does  not
  7407. cause the object to be transparent. Transparency is only occurs if there is a
  7408. non-zero "filter" value in the color.
  7409.  
  7410. The amount of bending or refracting of light depends upon the density of  the
  7411. material. Air, water, crystal, diamonds all have different density  and  thus
  7412. refract differently. The "index of refraction" or  "ior"  value  is  used  by
  7413. scientists to describe the relative density of substances. The "ior"  keyword
  7414. is used in POV-Ray to specify the value. For example:
  7415.  
  7416.   texture {
  7417.     pigment { White filter 0.9 }
  7418.     finish {
  7419.       refraction 1
  7420.       ior 1.5
  7421.     }
  7422.   }
  7423.  
  7424.  
  7425. The default ior value of 1.0 will give no refraction. The index of refraction
  7426. for air is 1.0, water is 1.33, glass is 1.5, and diamond  is  2.4.  The  file
  7427. IOR.INC pre-defines several useful values for ior.
  7428.  
  7429. NOTE: If a texture has a filter component and no value for refraction and ior
  7430. are supplied, the renderer will simply transmit the ray through  the  surface
  7431. with no bending. In layered textures, the refraction and ior keywords MUST be
  7432. in the last texture, otherwise they will not take effect.
  7433.  
  7434. 3.6.3.5.1        Light Attenuation
  7435.  
  7436. Light attenuation is used to model the decrease in  light  intensity  as  the
  7437. light travels through a translucent object. Its syntax is:
  7438.  
  7439.   finish {
  7440.     fade_distance FADE_DISTANCE
  7441.     fade_power FADE_POWER
  7442.   }
  7443.  
  7444.  
  7445. The fade_distance keyword determines the distance the light has to travel  to
  7446. reach half intensity while the fade_power  keyword  describes  how  fast  the
  7447. light will fall off. For realistic effects a fade power of 1 to 2  should  be
  7448. used.
  7449.  
  7450. The attenuation is calculated by a formula similar to  that  used  for  light
  7451. source attenuation.
  7452.  
  7453.                                  1
  7454.   attenuation = --------------------------------------
  7455.                  1 + (d / FADE_DISTANCE) ^ FADE_POWER
  7456.  
  7457.  
  7458. 3.6.3.5.2        Faked Caustics
  7459.  
  7460. The syntax is:
  7461.  
  7462.   finish {
  7463.     caustics POWER
  7464.   }
  7465.  
  7466.  
  7467. 3.6.3.6          Iridescence
  7468.  
  7469. The syntax is:
  7470.  
  7471.   finish {
  7472.     irid {
  7473.       AMOUNT
  7474.       thickness FLOAT
  7475.       turbulence VECTOR
  7476.     }
  7477.   }
  7478.  
  7479.  
  7480. Iridescence, or Newton's thin film  interference,  simulates  the  effect  of
  7481. light on surfaces with a microscopic transparent film overlay The  effect  is
  7482. like an oil slick on a puddle of water or the rainbow hues of a  soap  bubble
  7483. (see also "irid_wavelength" ).
  7484.  
  7485. This finish modifies the surface's color as a function of the  angle  between
  7486. the light source and the surface. Since the effect works in conjunction  with
  7487. the position and angle of the light sources  to  the  surface,  it  does  not
  7488. behave in the same ways as a procedural pigment pattern.
  7489.  
  7490. The "amount" parameter is the contribution of the iridescence effect  to  the
  7491. overall surface color.  As  a  rule  of  thumb,  keep  to  around  0.25  (25%
  7492. contribution) or less, but experiment. If  the  surface  is  coming  out  too
  7493. "white", try lowering the diffuse and possibly  the  ambient  values  of  the
  7494. surface.
  7495.  
  7496. The "thickness" parameter represents the film's thickness. This is an awkward
  7497. parameter to set, since the  thickness  value  has  no  relationship  to  the
  7498. object's scale. Changing it affects the scale, or "busy-ness" of the  effect.
  7499. A very thin film will have a high frequency of color changes, where  a  thick
  7500. film will have large areas of color.
  7501.  
  7502. The thickness  of  the  film  can  be  varied  with  the  special  turbulence
  7503. parameter. You can only  specify  turbulence  amount  with  iridescence.  The
  7504. octaves, lambda, and omega values are internally set and are  not  adjustable
  7505. by the user at this time.
  7506.  
  7507. In addition, perturbing the object's surface-normal through the use  of  bump
  7508. patterns will affect iridescence.
  7509.  
  7510. [*** This may be better off in povray.doc -dmf] For the  curious,  thin  film
  7511. interference occurs because, when the ray hits the surface of the film,  part
  7512. of the light is reflected from that surface, while a portion  is  transmitted
  7513. into the film. This "subsurface" ray travels through the film and  eventually
  7514. reflects off the opaque substrate. The light emerges from the  film  slightly
  7515. out of phase with the ray that was reflected from the surface.
  7516.  
  7517. This phase shift creates interference, which varies with  the  wavelength  of
  7518. the component colors, resulting in some wavelengths being  reinforced,  while
  7519. others are cancelled out. When these components are recombined, the result is
  7520. iridescence.
  7521.  
  7522. The concept used  for  this  feature  came  from  the  book  Fundamentals  of
  7523. Three-Dimensional Computer Graphics, by Alan Watt (Addison-Wesley).
  7524.  
  7525. 3.6.4            Halo
  7526.  
  7527. A halo is used to simulate some of the atmospheric effects  that  occur  when
  7528. small particles interact with light or radiate on their  own.  Those  effects
  7529. include clouds, fogs, fire, etc.
  7530.  
  7531. Halos are attached to an object, the so called "container object", which they
  7532. completely fill. If the object is partially or completely translucent and the
  7533. object is specified to be hollow (see "Hollow" for  more  details)  the  halo
  7534. will be visible. Thus the halo effects are limited  to  the  space  that  the
  7535. object covers. This should always be kept in mind.
  7536.  
  7537. What the halo actually will look like depends on a lot of  parameters.  First
  7538. of all you have to specify which kind of effect you want to  simulate.  After
  7539. this you need to define the distribution of the particles. This is  basically
  7540. done in two steps: a mapping function is selected and a density  function  is
  7541. chosen.  The  first  function  maps   world   coordinates   space   onto   a
  7542. one-dimensional interval while the later describes how this  linear  interval
  7543. is mapped onto the final density values.
  7544.  
  7545. The properties of the particles, such as their color and their  translucency,
  7546. are given by a color map.  The  density  values  calculated  by  the  mapping
  7547. processes are used to determine the appropriate color using this color map.
  7548.  
  7549. A ray marching process is used to volume sample the halo  and  to  accumulate
  7550. the intensities and opacity of each interval.
  7551.  
  7552. The following sections will describe all  of  the  halo  parameters  in  more
  7553. detail. The complete halo syntax is given by:
  7554.  
  7555.   halo {
  7556.     attenuating | emitting | glowing | dust
  7557.     [ constant | linear | cubic | poly ]
  7558.     [ planar_mapping | spherical_mapping |
  7559.       cylindrical_mapping | box_mapping ]
  7560.     [ dust_type DUST_TYPE ]
  7561.     [ eccentricity ECCENTRICITY ]
  7562.     [ max_value MAX_VALUE ]
  7563.     [ exponent EXPONENT ]
  7564.     [ samples SAMPLES ]
  7565.     [ aa_level AA_LEVEL ]
  7566.     [ aa_threshold AA_THRESHOLD ]
  7567.     [ jitter JITTER ]
  7568.     [ turbulence <TURBULENCE> ]
  7569.     [ octaves OCTAVES ]
  7570.     [ omega OMEGA ]
  7571.     [ lambda LAMBDA ]
  7572.     [ colour_map COLOUR_MAP ]
  7573.     [ frequency FREQUENCY ]
  7574.     [ phase PHASE ]
  7575.     [ scale <VECTOR> ]
  7576.     [ rotate <VECTOR> ]
  7577.     [ translate <VECTOR> ]
  7578.   }
  7579.  
  7580.  
  7581. 3.6.4.1          Halo Type
  7582.  
  7583. The type of the halo is defined by one of the  following  mutually  exclusive
  7584. keywords (if more than one is specified the last will be used).  The  default
  7585. is "attenuating".
  7586.  
  7587.   halo {
  7588.     attenuating | emitting | glowing | dust
  7589.   }
  7590.  
  7591.  
  7592. The halo type determines how the  light  will  interact  with  the  particles
  7593. inside the  container  object.  There  are  two  basic  categories  of  light
  7594. interaction: self-illuminated and illuminated. The first  type  includes  the
  7595. "attenuating", "emitting", and "glowing" effects while the "dust"  effect  is
  7596. of the second type.
  7597.  
  7598. Those four types will be covered in detail in the next sections.
  7599.  
  7600.  
  7601. 3.6.4.1.1        Attenuating
  7602.  
  7603. The attenuating halo, that only absorbs light passing through it, is rendered
  7604. by accumulating the particle density along a ray. The  total  halo  color  is
  7605. determined from the total, accumulated density and the  specified  color  map
  7606. (see "Halo Color Map" for details about the color map). The background light,
  7607. i.e. the light passing through the halo, is attenuated by the  total  density
  7608. and added to the total halo color to get the final color of the halo.
  7609.  
  7610. This model is suited to render particle distributions with  a  high  "albedo"
  7611. because the final color does not depend on the transparency of single  volume
  7612. elements but only on the total transparency along the ray. The  albedo  of  a
  7613. particle is given by the amount of light scattered by this  particle  in  all
  7614. directions in relation to the amount  of  incoming  light.  If  the  particle
  7615. doesn't absorb any light the albedo is one.
  7616.  
  7617. Clouds and steams are two of the effects that can be rendered quite realistic
  7618. by adding enough turbulence.
  7619.  
  7620.  
  7621. 3.6.4.1.2        Dust
  7622.  
  7623. The dust halo consists of particles that do not emit  any  light.  They  only
  7624. reflect and absorb incoming light. Its syntax is:
  7625.  
  7626.   halo {
  7627.     dust
  7628.     [ dust_type DUST_TYPE ]
  7629.     [ eccentricity ECCENTRICITY ]
  7630.   }
  7631.  
  7632.  
  7633. As the ray marches through the dust all light coming from any  light  sources
  7634. is accumulated and scattered according to the dust type and the current  dust
  7635. density. Since this light accumulation includes a test for  occlusion,  other
  7636. objects may cast shadows "into" the dust.
  7637.  
  7638. The same scattering types that are used with the atmosphere  in  "Atmosphere"
  7639. can be used with the dust (the default type is  isotropic  scattering).  They
  7640. are:
  7641.  
  7642.   #declare ISOTROPIC_SCATTERING         = 1
  7643.   #declare MIE_HAZY_SCATTERING          = 2
  7644.   #declare MIE_MURKY_SCATTERING         = 3
  7645.   #declare RAYLEIGH_SCATTERING          = 4
  7646.   #declare HENYEY_GREENSTEIN_SCATTERING = 5
  7647.  
  7648.  
  7649. The Henyey-Greenstein function needs the additional parameter  "eccentricity"
  7650. that is describe in the section about atmosphere.
  7651.  
  7652.  
  7653. 3.6.4.1.3        Emitting
  7654.  
  7655. Emitting halos only emit light. Every particle is a small light  source  that
  7656. emits some light. This light is not attenuated by the other particles because
  7657. they are assumed to be very small.
  7658.  
  7659. As the ray travels through the density field of an emitting halo the color of
  7660. the particles in each volume element and their differential  transparency  is
  7661. determined from the color map. These intensities are accumulated to  get  the
  7662. total color of the density field. This total intensity is added to the  light
  7663. passing through the halo. The background light is  attenuated  by  the  total
  7664. density of the halo.
  7665.  
  7666. Since the emitted light is not attenuated it can be  used  to  model  effects
  7667. like fire, explosions, light beams, etc. By choosing a well suited color  map
  7668. those effects can be rendered with a high degree of realism.
  7669.  
  7670. Fire is best  modeled  using  planar  mapping.  Spherical  mapping  and  high
  7671. turbulence values can be used to  create  explosions  (it's  best  to  use  a
  7672. periodic color map and frequencies larger than one).
  7673.  
  7674. Emitting halos do not cast any light on other objects like light sources  do,
  7675. even though they are made up of small, light-emitting particles. In order  to
  7676. make them actually emit light hundreds or thousands of  small  light  sources
  7677. would have to be used. This would slow down tracing by a  degree  that  would
  7678. make it useless.
  7679.  
  7680.  
  7681. 3.6.4.1.4        Glowing
  7682.  
  7683. The glowing halo is similar to the emitting halo. The difference is that  the
  7684. light emitted by the particles is attenuated by the other particles. This can
  7685. be seen as a combination of the attenuating and the emitting model.
  7686.  
  7687.  
  7688. 3.6.4.2          Density Mapping
  7689.  
  7690. The  density  mapping  is  used  to  map  points  in  space  onto  a  linear,
  7691. one-dimensional interval between 0.0 and 1.0. The different mapping types are
  7692. specified by (the default is planar mapping):
  7693.  
  7694.   halo {
  7695.     planar_mapping | spherical_mapping |
  7696.     cylindrical_mapping | box_mapping
  7697.   }
  7698.  
  7699.  
  7700. Since the mapping takes place in relation to the coordinate center/axis/plane
  7701. the following rule should be noticed: Halo container objects should  be  unit
  7702. sized objects centered at the origin. They can be transformed later  to  suit
  7703. the individuals needs.
  7704.  
  7705.  
  7706. 3.6.4.2.1        Box Mapping
  7707.  
  7708. The maximum of the absolute values of each coordinate given by
  7709.  
  7710.   r(x, y, z) = max(abs(x), abs(y), abs(z))
  7711.  
  7712.  
  7713. is used to get the interval values. Values larger than  one  are  clipped  to
  7714. one.
  7715.  
  7716.  
  7717. 3.6.4.2.2        Cylindrical Mapping
  7718.  
  7719. The distance r(x, y, z) from the y-axis given by
  7720.  
  7721.   r(x, y, z) = sqrt(x*x + z*z)
  7722.  
  7723.  
  7724. is used to get the interval values. Values larger than  one  are  clipped  to
  7725. one.
  7726.  
  7727.  
  7728. 3.6.4.2.3        Planar Mapping
  7729.  
  7730. The distance r(x, y, z) from the x-z-plane given by
  7731.  
  7732.   r(x, y, z) = abs(y)
  7733.  
  7734.  
  7735. is used to get the interval values. Values larger than  one  are  clipped  to
  7736. one.
  7737.  
  7738.  
  7739. 3.6.4.2.4        Spherical Mapping
  7740.  
  7741. The distance r(x, y, z) from the origin given by
  7742.  
  7743.   r(x, y, z) = sqrt(x*x + y*y + z*z)
  7744.  
  7745.  
  7746. is used to get the interval values. Values larger than  one  are  clipped  to
  7747. one.
  7748.  
  7749.  
  7750. 3.6.4.3          Density Function
  7751.  
  7752. The density function determines how the actual density values are  calculated
  7753. from the linear, one-dimensional interval that the density mapping  gave.  It
  7754. is specified by the following keywords:
  7755.  
  7756.   halo {
  7757.     [ constant | linear | cubic | poly ]
  7758.     [ max_value MAX_VALUE ]
  7759.     [ exponent EXPONENT ]
  7760.   }
  7761.  
  7762.  
  7763. The individual functions f(r) are described in the following  sections.  They
  7764. all map the value r(x, y,  z)  calculated  by  the  density  mapping  onto  a
  7765. suitable density range between 0 and MAX_VALUE (specified  with  the  keyword
  7766. "max_value").
  7767.  
  7768.  
  7769. 3.6.4.3.1        Constant
  7770.  
  7771. The constant function gives the constant value MAX_VALUE  regardless  of  the
  7772. interval value after the density mapping. Its formula is:
  7773.  
  7774.   f(r) = MAX_VALUE
  7775.  
  7776.  
  7777. 3.6.4.3.2        Linear
  7778.  
  7779. A linear falloff from MAX_VALUE at r=0 to 0 at r=1 can be realized  with  the
  7780. linear function. It is given by:
  7781.  
  7782.   f(r) = MAX_VALUE * (1 - r)
  7783.  
  7784.  
  7785. 3.6.4.3.3        Cubic
  7786.  
  7787. The cubic function gives a smooth blend between the maximum  value  MAX_VALUE
  7788. at r=0 and 0 at r=1. It is given by:
  7789.  
  7790.   f(r) = MAX_VALUE * (2 * r  - 3) * r * r + 1
  7791.  
  7792.  
  7793. This is actually a cubic spline.
  7794.  
  7795.  
  7796. 3.6.4.3.4        Poly
  7797.  
  7798. A polynomial function  can  be  used  to  get  a  great  variety  of  density
  7799. functions. All have the maximum value MAX_VALUE at r=0 and the minimum  value
  7800. 0 at r=1. It is given by:
  7801.  
  7802.   f(r) = MAX_VALUE * (1 - r) ^ EXPONENT
  7803.  
  7804.  
  7805. The exponent is given by the "exponent" keyword. In case of EXPONENT=0 you'll
  7806. get a linear falloff.
  7807.  
  7808.  
  7809. 3.6.4.4          Halo Color Map
  7810.  
  7811. The density f(r), which ranges from 0.0 to  MAX_VALUE,  is  mapped  onto  the
  7812. color map to get the color and  differential  translucency  for  each  volume
  7813. element as the ray marches through the density field (for more details  about
  7814. the color mapping see "Halo Type" ). The differential translucency determines
  7815. for each value of f(r) how much the total opacity has  to  be  increased  (or
  7816. decreased).
  7817.  
  7818. The color map is specified by:
  7819.  
  7820.   halo {
  7821.     [ colour_map COLOUR_MAP ]
  7822.   }
  7823.  
  7824.  
  7825. The differential translucency is stored in the transmittance channel  of  the
  7826. map's color entries. A simple example is given by
  7827.  
  7828.   colour_map {
  7829.     [0 rgbt<1, 1, 1, 1>]
  7830.     [1 rgbt<1, 1, 1, 0>]
  7831.   }
  7832.  
  7833.  
  7834. In this example areas with a low density (small  f(r))  will  be  translucent
  7835. (large differential translucency) and areas with a high density (large  f(r))
  7836. will be opaque (small differential translucency).
  7837.  
  7838. There is no default color map.
  7839.  
  7840.  
  7841. 3.6.4.5          Halo Sampling
  7842.  
  7843. The halo effects are calculated by marching through the density field along a
  7844. ray. At discrete steps samples are taken from the density field and evaluated
  7845. according to the color map and all  other  parameters.  The  effects  of  all
  7846. volume elements are accumulated to get the total effect.
  7847.  
  7848. The following parameters are used to tune the sampling process:
  7849.  
  7850.   halo {
  7851.     [ samples SAMPLES ]
  7852.     [ aa_level AA_LEVEL ]
  7853.     [ aa_threshold AA_THRESHOLD ]
  7854.     [ jitter JITTER ]
  7855.   }
  7856.  
  7857.  
  7858. The individual sampling parameters are described in the sections below.
  7859.  
  7860.  
  7861. 3.6.4.5.1        Number of Samples
  7862.  
  7863. The number of samples that are taken along the ray inside the halo  container
  7864. object is specified by the "samples"  keyword.  The  greater  the  number  of
  7865. samples the more denser the density field is sampled along the  ray  and  the
  7866. more accurate, but slower the result will be.
  7867.  
  7868. The default number of samples is 10. This is sufficient  for  simple  density
  7869. fields that don't use turbulence.
  7870.  
  7871. High turbulence values and dust halos normally need a large number of samples
  7872. to avoid aliasing artifacts.
  7873.  
  7874.  
  7875. 3.6.4.5.2        Supersampling
  7876.  
  7877. The sampling is prone to alias (like the atmosphere sampling in  "Atmosphere"
  7878. ). One way to reduce possible aliasing artifacts is to use supersampling.  If
  7879. two neighboring samples differ too  much  an  additional  sampling  is  taken
  7880. in-between. This process recurses until the samples are close too each  other
  7881. (i.e. the values of the samples, not their distance) or the maximum recursion
  7882. level given by AA_LEVEL is reached. The threshold to kick supersampling in is
  7883. given by AA_THRESHOLD.
  7884.  
  7885. By default supersampling is not used. The default values for AA_THRESHOLD and
  7886. AA_LEVEL are 0.3 and 3.
  7887.  
  7888.  
  7889. 3.6.4.5.3        Jitter
  7890.  
  7891. Jitter can be used to introduce some noise to the  sampling  locations.  This
  7892. may help to reduce aliasing artifacts at the cost of an increased noise level
  7893. in the image. But since the human visual system is  much  more  forgiving  to
  7894. noise than it is to regular patterns, this is not much of a problem.
  7895.  
  7896. By default jittering is not used. The values should be smaller than 1.0.
  7897.  
  7898. Note that the jittering is used even if the supersampling is not used.
  7899.  
  7900.  
  7901. 3.6.4.6          Halo Modifiers
  7902.  
  7903. This section covers all general halo modifiers. They are:
  7904.  
  7905.   halo {
  7906.     [ turbulence <TURBULENCE> ]
  7907.     [ octaves OCTAVES ]
  7908.     [ omega OMEGA ]
  7909.     [ lambda LAMBDA ]
  7910.     [ frequency FREQUENCY ]
  7911.     [ phase PHASE ]
  7912.     [ scale <VECTOR> ]
  7913.     [ rotate <VECTOR> ]
  7914.     [ translate <VECTOR> ]
  7915.   }
  7916.  
  7917.  
  7918. 3.6.4.6.1        Turbulence Modifier
  7919.  
  7920.  
  7921. 3.6.4.6.2        Octaves Modifier
  7922.  
  7923.  
  7924. 3.6.4.6.3        Omega Modifier
  7925.  
  7926.  
  7927. 3.6.4.6.4        Lambda Modifier
  7928.  
  7929.  
  7930. 3.6.4.6.5        Frequency Modifier
  7931.  
  7932. The frequency parameter adjusts the number of times the density  interval  is
  7933. mapped onto itself, i.e. the range from 0.0 to 1.0, before it is mapped  onto
  7934. the color map. The formula doing this is:
  7935.  
  7936.   f_new(r) = (f(r) * FREQUENCY + PHASE) modulo 1.0
  7937.  
  7938.  
  7939. Thus the halo color map will be repeated by FREQUENCY.
  7940.  
  7941.  
  7942. 3.6.4.6.6        Phase Modifier
  7943.  
  7944. The phase parameter determines the offset at which the mapping of the density
  7945. field onto itself starts. The formula doing this is:
  7946.  
  7947.   f_new(r) = (f(r) * FREQUENCY + PHASE) modulo 1.0
  7948.  
  7949.  
  7950. Thus the color entry for density f(r)=0 can be moved to PHASE modulo 1.0.
  7951.  
  7952.  
  7953. 3.6.4.6.7        Transformation Modifiers
  7954.  
  7955. Halos can be transformed using the rotate, scale and translate keywords.  You
  7956. have to be careful that you don't move the density field out of the container
  7957. object though.
  7958.  
  7959.  
  7960. 3.6.5            Special Textures
  7961.  
  7962. Special textures are complex textures  made  up  of  multiple  textures.  The
  7963. component textures may be plain  textures  or  may  be  made  up  of  special
  7964. textures. A plain texture has just one pigment, normal and finish  statement.
  7965. Even a pigment with a pigment_map is still one pigment and thus considered  a
  7966. plain texture as are normals with normal_map statements.
  7967.  
  7968. Special textures use either a texture_map to specify a blend  or  pattern  of
  7969. textures or they use a bitmap similar to an image_map called a  material_map.
  7970.  
  7971.  
  7972. There are restrictions on using special textures. A special texture  may  not
  7973. be used as a default  texture.  See  the  "#default"  language  directive.  A
  7974. special texture cannot be used as a layer in a layered  texture  however  you
  7975. may use layered textures as any of the textures contained  within  a  special
  7976. texture.
  7977.  
  7978.  
  7979.  
  7980.  
  7981.  
  7982. {/HEADER 3 Texture Maps}
  7983.  
  7984. In addition to specifying blended color with a color_map, or pigment_map, you
  7985. may create a blend  of  textures  using  a  texture_map.  The  syntax  for  a
  7986. texture_map is identical to pigment_map except you specify a texture in  each
  7987. map entry.
  7988.  
  7989. A texture_map is specified by...
  7990.  
  7991.   texture{
  7992.     PATTERN_TYPE
  7993.     texture_map {
  7994.       [ NUM_1 TEXTURE_BODY_1]
  7995.       [ NUM_2 TEXTURE_BODY_2]
  7996.       [ NUM_3 TEXTURE_BODY_3]
  7997.        ...
  7998.     }
  7999.     TEXTURE_MODIFIERS...
  8000.   }
  8001.  
  8002.  
  8003. Where NUM_1, NUM_2... are float values  between  0.0  and  1.0  inclusive.  A
  8004. TEXTURE_BODY is anything that would normally appear inside  a  texture  {...}
  8005. statement but the texture keyword and {} braces are not needed. NOTE: the  []
  8006. brackets are part of the actual statement. They are  not  notational  symbols
  8007. denoting optional parts. The brackets surround each entry in the  map.  There
  8008. may be from 2 to 256 entries in the map.
  8009.  
  8010. For example,
  8011.  
  8012.   texture {
  8013.     gradient x       //this is the PATTERN_TYPE
  8014.     texture_map {
  8015.       [0.3  pigment{Red} finish{phong 1}]
  8016.       [0.3  T_Wood11]    //this is a texture identifier
  8017.       [0.6  T_Wood11]
  8018.       [0.9  pigment{DMFWood4} finish{Shiny}]
  8019.     }
  8020.   }
  8021.  
  8022.  
  8023. When the gradient x function returns values from 0.0  to  0.3  then  the  red
  8024. highlighted texture is used. From 0.3 to 0.6 the texture identifier  T_Wood11
  8025. is used. From 0.6 up to 0.9 a blend of T_Wood11 and a shiny DMFWood4 is used.
  8026. From 0.9 on up only the shiny wood is used.
  8027.  
  8028. Texture maps may be nested  to  any  level  of  complexity  you  desire.  The
  8029. textures in a map may have color_map or texture_maps or any type  of  texture
  8030. you want.
  8031.  
  8032. The  blended  area  of  a  texture  map  works  by  fully  calculating  both
  8033. contributing textures in their entirety and then linearly  interpolating  the
  8034. apparent  colors.  This  means  that  reflection,  refraction  and  lighting
  8035. calculations are done twice for every point. This is in contrast to  using  a
  8036. pigment_map and normal_map in a plain texture, where the pigment is computed,
  8037. then the normal, then reflection, refraction,  and  lighting  are  calculated
  8038. once for that point.
  8039.  
  8040. Entire textures may also be used with the block  patterns  such  as  checker,
  8041. hexagon and brick. For example...
  8042.  
  8043.   texture {
  8044.     checker
  8045.       texture { T_Wood12 scale .8 }
  8046.       texture { pigment { White_Marble } finish { Shiny } scale .5 }
  8047.     }
  8048.   }
  8049.  
  8050.  
  8051. Note that in the case of  block  patterns,  the  texture  {...}  wrapping  is
  8052. required around the texture information. Also note that this syntax prohibits
  8053. the use of a layered texture however you can work around this by declaring  a
  8054. texture identifier for the layered texture and referencing the identifier.
  8055.  
  8056. A texture_map is also used with the average pattern type. See  "Average"  for
  8057. details.
  8058.  
  8059. 3.6.5.1          Tiles
  8060.  
  8061. Earlier versions of POV-Ray had a special texture called tiles  texture  that
  8062. created a checkered pattern of textures. Although it is still  supported  for
  8063. backwards  computability,  you  should  use  checker  block  texture  pattern
  8064. described in the previous "texture_map" section rather than tiles textures.
  8065.  
  8066. 3.6.5.2          Material Maps
  8067.  
  8068. The material_map special texture extends the concept of image_map to apply to
  8069. entire textures rather than solid colors. A material_map allows you to wrap a
  8070. 2-D bit-mapped texture pattern around your 3-D objects.
  8071.  
  8072. Instead of placing a solid color of the image on the shape like an image_map,
  8073. an entire texture is specified based on the index or color of  the  image  at
  8074. that point. You must specify a list of textures to be used  like  a  "texture
  8075. palette" rather than the usual color palette.
  8076.  
  8077. When used with mapped file types such as GIF, and some PNG  and  TGA  images,
  8078. the index of the pixel is used as an index into  the  list  of  textures  you
  8079. supply. For unmapped file types such as some PNG and TGA images,  the  8  bit
  8080. value of the red component in the range 0-255 is used as an index.
  8081.  
  8082. If the index of a pixel is greater than the number of textures in  your  list
  8083. then the index is taken modulo N where N  is  the  length  of  your  list  of
  8084. textures.
  8085.  
  8086. 3.6.5.2.1        Specifying a Material Map
  8087.  
  8088. The syntax for material_map is...
  8089.  
  8090.   texture {
  8091.     material_map {
  8092.       FILE_TYPE "filename"
  8093.       BITMAP_MODIFIERS...
  8094.       texture {...} // First used for index 0
  8095.       texture {...} // Second texture used for index 1
  8096.       texture {...} // Third texture used for index 2
  8097.       texture {...} // Fourth texture used for index 3
  8098.                     // and so on for however many used.
  8099.     }
  8100.     TRANSFORMATION...
  8101.   }
  8102.  
  8103.  
  8104. If particular index values are not used in an image then it may be  necessary
  8105. to supply dummy textures. It may be necessary to use a paint program or other
  8106. utility to examine the map file's palette to determine  how  to  arrange  the
  8107. texture list.
  8108.  
  8109. Where FILE_TYPE is one of the following keywords gif,  tga,  iff,  ppm,  pgm,
  8110. png, or sys. This is followed by the name of the file using any valid  string
  8111. expression. Several optional modifiers may follow the file specification. The
  8112. modifiers are described below. Note: Earlier versions of POV-Ray allowed some
  8113. modifiers before the FILE_TYPE but that syntax is being phased out  in  favor
  8114. of the syntax described here.
  8115.  
  8116. Filenames specified in the material_map statements will be  searched  for  in
  8117. the home (current) directory first, and if not found, will then  be  searched
  8118. for in directories specified by any +L  switches  or  Library_Path=  options.
  8119. This would facilitate keeping all your material  maps  files  in  a  separate
  8120. subdirectory, and specifying a library path to them. Note that any  operating
  8121. system default paths are not searched unless  you  also  specify  them  as  a
  8122. Library_Path.
  8123.  
  8124. By default, the material is mapped  onto  the  X-Y  plane.  The  material  is
  8125. "projected" onto the object as though there were a slide projector  somewhere
  8126. in the -Z direction. The material exactly fills  the  square  area  from  x,y
  8127. coordinates (0,0) to (1,1)  regardless  of  the  bitmap's  original  size  in
  8128. pixels. If you would like to change this default, you may  translate,  rotate
  8129. or scale the texture to map it onto the object's surface as desired.
  8130.  
  8131. The file name is optionally followed by one  or  more  BITMAP_MODIFIERS.  See
  8132. "bitmap modifiers" for other details.
  8133.  
  8134. After a material_map statement but still inside the texture statement you may
  8135. apply any legal texture modifiers. Note that no other pigment, normal, finish
  8136. or halo statements may be added to the texture outside the material_map. This
  8137. is illegal:
  8138.  
  8139.   texture {
  8140.     material_map {
  8141.       gif "matmap.gif"
  8142.       texture {T1}
  8143.       texture {T2}
  8144.       texture {T3}
  8145.     }
  8146.     finish {phong 1.0}
  8147.   }
  8148.  
  8149.  
  8150. The finish must be individually added to each texture.
  8151.  
  8152. Note that earlier versions of POV-Ray allowed such  specifications  but  they
  8153. were ignored. The above restrictions on syntax were necessary for various bug
  8154. fixes. This means some POV-Ray 1.0 scenes using material_maps many need minor
  8155. modifications  that  cannot  be  done   automatically   with   the   version
  8156. compatibility mode.
  8157.  
  8158. The textures within a material_map texture may be  layered  but  material_map
  8159. textures do don't work as part of a layered texture. To use a layered texture
  8160. inside a material_map you must declare it as a texture identifier and  invoke
  8161. it in the texture list.
  8162.  
  8163. 3.6.6            Layered Textures
  8164.  
  8165. It is possible to create a variety of special effects using layered textures.
  8166. A  layered  texture  is  one  where  several  textures  that  are  partially
  8167. transparent are laid one on top  of  the  other  to  create  a  more  complex
  8168. texture. The different texture layers show through the  transparent  portions
  8169. to create the appearance of one texture that  is  a  combination  of  several
  8170. textures.
  8171.  
  8172. You create layered textures by listing two or more textures one  right  after
  8173. the other. The last texture listed will be  the  top  layer,  the  first  one
  8174. listed will be the bottom layer. All textures in a layered texture other than
  8175. the bottom layer should have some transparency. For example:
  8176.  
  8177.   object {
  8178.     My_Object
  8179.     texture {T1}  // the bottom layer
  8180.     texture {T2}  // a semi-transparent layer
  8181.     texture {T3}  // the top semi-transparent layer
  8182.   }
  8183.  
  8184.  
  8185. In this example T2 shows only where T3 is transparent and T1 shows only where
  8186. T2 and T3 are transparent.
  8187.  
  8188. The color of underlying layers is filtered by upper layers but the results do
  8189. not look exactly like a series of transparent surfaces. If you had a stack of
  8190. surfaces with the textures applied to  each,  the  light  would  be  filtered
  8191. twice: once on the way in as the lower layers  are  illuminated  by  filtered
  8192. light  and  once  on  the  way  out.  Layered  textures  do  not  filter  the
  8193. illumination on the way in. Other parts of  the  lighting  calculations  work
  8194. differently as well. The result look great and allow  for  fantastic  looking
  8195. textures but they are simply different from multiple surfaces. See STONES.INC
  8196. in the standard include files for some magnificent layered textures.
  8197.  
  8198. Note layered textures  must  use  the  "texture  {...}"  wrapped  around  any
  8199. pigment, normal or finish statements. Do not use multiple pigment, normal  or
  8200. finish statements without putting them inside the texture statement.
  8201.  
  8202. Layered textures may be declared. For example:
  8203.  
  8204.   #declare Layered_Examp=
  8205.     texture {T1}
  8206.     texture {T2}
  8207.     texture {T3}
  8208.  
  8209.  
  8210. Then invoke it as follows:
  8211.  
  8212.   object {
  8213.     My_Object
  8214.     texture {
  8215.       Layer_Examp
  8216.       // Any pigment, normal or finish here
  8217.       // modifies the bottom layer only.
  8218.     }
  8219.   }
  8220.  
  8221.  
  8222. If you wish to use a layered texture in a  block  pattern  such  as  checker,
  8223. hexagon, or brick or in a material_map, you must declare it  first  and  then
  8224. reference it inside a single texture statement. A special texture  cannot  be
  8225. used as a layer in a layered texture however you may use layered textures  as
  8226. any of the textures contained within a special texture.
  8227.  
  8228. 3.6.7            Patterns
  8229.  
  8230. POV-Ray uses a method called  "3D  solid  texturing"  to  define  the  color,
  8231. bumpiness and other properties of a surface. You specify  the  way  that  the
  8232. texture varies over a surface by specifying a pattern. Patterns are  used  in
  8233. pigments, normals and texture maps.
  8234.  
  8235. All patterns in POV-Ray are three dimensional. For every point in space, each
  8236. pattern has a unique value. Patterns  do  not  wrap  around  a  surface  like
  8237. putting wallpaper on an object. The patterns exist in 3-d and the objects are
  8238. carved from them like carving an object from a solid block of wood or  stone.
  8239.  
  8240.  
  8241. Consider a block  of  wood.  It  contains  light  and  dark  bands  that  are
  8242. concentric cylinders being the growth rings of the wood. On the  end  of  the
  8243. block you see these concentric circles. Along its length you see  lines  that
  8244. are the veins. However the pattern exists throughout the entire block. If you
  8245. cut or carve the wood it reveals  the  pattern  inside.  Similarly  an  onion
  8246. consists of concentric spheres that are  visible  only  when  you  slice  it.
  8247. Marble stone consists of wavy layers of colored sediments  that  harden  into
  8248. rock.
  8249.  
  8250. These solid patterns can be simulated  using  mathematical  functions.  Other
  8251. random patterns such as granite or bumps and dents can be generated  using  a
  8252. random number system and a noise function.
  8253.  
  8254. In each case, the x, y, z coordinate of a point  on  a  surface  is  used  to
  8255. compute some mathematical function that returns a float value. When used with
  8256. color maps or pigment maps, that value looks up the color of the  pigment  to
  8257. be used. In normal  statements,  the  pattern  function  result  modifies  or
  8258. perturbs the surface normal vector to give a bumpy appearance.  Used  with  a
  8259. texture map, the function result  determines  which  combinations  of  entire
  8260. textures to be used.
  8261.  
  8262. See the sections "pigment" , "color_map" , "normal" , and  "texture_map"  for
  8263. more details on how to use patterns. The  following  sections  describe  each
  8264. pattern.
  8265.  
  8266. 3.6.7.1          Agate
  8267.  
  8268. The agate pattern.
  8269.  
  8270. This pattern is a banded pattern similar to marble, but it uses a specialized
  8271. built-in  turbulence  function  that  is  different  from  the   traditional
  8272. turbulence. The traditional  turbulence  can  be  used  as  well  but  it  is
  8273. generally not necessary because agate is  already  very  turbulent.  You  may
  8274. control the amount of  the  built-in  turbulence  by  adding  the  agate_turb
  8275. keyword followed by a float value. For example:
  8276.  
  8277.   pigment {
  8278.     agate
  8279.     agate_turb 0.5
  8280.     color_map {
  8281.       ...
  8282.     }
  8283.   }
  8284.  
  8285.  
  8286. The agate pattern uses the ramp_wave wave type by default  but  may  use  any
  8287. wave type. The pattern may be used with color_map,  pigment_map,  normal_map,
  8288. slope_map and texture_map.
  8289.  
  8290. 3.6.7.2          Average
  8291.  
  8292. Technically average is not a pattern type but it is listed here  because  the
  8293. syntax is similar to other patterns. Typically a pattern type  specifies  how
  8294. colors or normals are chosen from a pigment map or normal map however average
  8295. tells POV-Ray to average together all of the patterns  you  specify.  Average
  8296. was originally designed to be used in a normal statement with a normal map as
  8297. a method of specifying more than one normal  pattern  on  the  same  surface.
  8298. However average may be used in a pigment statement with a pigment map, or  in
  8299. a texture statement with a texture map to average colors too.
  8300.  
  8301. When used with pigments, the syntax is:
  8302.  
  8303.   pigment {
  8304.     average
  8305.     pigment_map
  8306.     {
  8307.       [WEIGHT_1 PIGMENT_BODY_1]
  8308.       [WEIGHT_2 PIGMENT_BODY_2]
  8309.       ...
  8310.       [WEIGHT_n PIGMENT_BODY_n]
  8311.     }
  8312.     PIGMENT_MODIFIER
  8313.   }
  8314.  
  8315.  
  8316. A PIGMENT_BODY is anything that would normally appear inside a pigment  {...}
  8317. statement but the pigment keyword and the {} braces are not needed. NOTE: the
  8318. [] brackets are part of the actual statement. They are not notational symbols
  8319. denoting optional parts. The brackets surround each entry in the  map.  There
  8320. may be from 2 to 256 entries in the map. The values WEIGHT_1, WEIGHT_2,  etc.
  8321. are optional float values that specify the relative weight of  each  pigment.
  8322. The default weight if unspecified is 1.0. All of the  pigments  are  computed
  8323. separately, the colors are then weighted and averaged.
  8324.  
  8325. Similarly you may use a texture map in a texture statement. All textures  are
  8326. fully computed. The resulting colors are then weighted and averaged.
  8327.  
  8328. When used with a normal map in a normal statement,  multiple  copies  of  the
  8329. original surface normal are created and are perturbed by  each  pattern.  The
  8330. perturbed normals are then weighted, added and normalized.
  8331.  
  8332. See the sections "pigment_map" , "normal_map" , and  "texture_map"  for  more
  8333. information.
  8334.  
  8335. 3.6.7.3          Bozo
  8336.  
  8337. The bozo pattern.
  8338.  
  8339. The  bozo  pattern  is  a  very  smooth,  random  noise  function  that   is
  8340. traditionally used with some turbulence to create clouds. The spotted pattern
  8341. is identical to bozo but in early versions of POV-Ray, spotted did not  allow
  8342. turbulence to be added. Turbulence can now be added to any pattern  so  these
  8343. are redundant but both are retained for backwards  compatibility.  The  bumps
  8344. pattern is also identical to bozo when  used  anywhere  except  in  a  normal
  8345. statement. When used as a normal, bumps uses a slightly different  method  to
  8346. perturb the normal with a similar noise function.
  8347.  
  8348. The bozo noise function has the following properties:
  8349.  
  8350.   1. It's defined over 3D space i.e., it takes x, y, and z  and  returns  the
  8351.      noise value there.
  8352.   2. If two points are far apart,  the  noise  values  at  those  points  are
  8353.      relatively random.
  8354.   3. If two points are close together, the noise values at those  points  are
  8355.      close to each other.
  8356.  
  8357.  
  8358. You can visualize this as having a large room and a thermometer  that  ranges
  8359. from 0.0 to 1.0. Each point in the room has a temperature.  Points  that  are
  8360. far apart have relatively random temperatures. Points that are close together
  8361. have close temperatures. The temperature changes smoothly, but randomly as we
  8362. move through the room.
  8363.  
  8364. Now, let's place an object into this room along with an  artist.  The  artist
  8365. measures the temperature at each point on the object and paints that point  a
  8366. different color depending on the temperature. What do we get? A POV-Ray  bozo
  8367. texture!
  8368.  
  8369. The bozo pattern uses the ramp_wave wave type by default but may use any wave
  8370. type. The pattern  may  be  used  with  color_map,  pigment_map,  normal_map,
  8371. slope_map and texture_map.
  8372.  
  8373. 3.6.7.4          Brick
  8374.  
  8375. The brick pattern.
  8376.  
  8377. The brick pattern generates a pattern of bricks. The  bricks  are  offset  by
  8378. half a brick length on every other row in the X and Z directions. A layer  of
  8379. mortar surrounds each brick. The syntax is given by
  8380.  
  8381.   pigment {
  8382.     brick COLOR_1, COLOR_2
  8383.     brick_size VECTOR
  8384.     mortar FLOAT
  8385.   }
  8386.  
  8387.  
  8388. where COLOR_1 is the color of the mortar, and COLOR_2 is  the  color  of  the
  8389. brick itself. If no colors are specified, a default deep red  and  dark  gray
  8390. are used. The default size of the brick and mortar together is  <8,  3,  4.5>
  8391. units. The default thickness of the mortar is 0.5 units. These values may  be
  8392. changed using the optional brick_size and mortar pattern modifiers.  You  may
  8393. also use pigment statements in place of the colors. For example:
  8394.  
  8395.   pigment {
  8396.     brick pigment{Jade}, pigment{Black_Marble}
  8397.   }
  8398.  
  8399.  
  8400. When used with normals, the syntax is
  8401.  
  8402.   normal {
  8403.     brick BUMP_FLOAT
  8404.   }
  8405.  
  8406.  
  8407. Where BUMP_FLOAT is an optional bump size float value. You may also use  full
  8408. normal statements. For example:
  8409.  
  8410.   normal {
  8411.     brick normal{bumps 0.2}, normal{granite 0.3}
  8412.   }
  8413.  
  8414.  
  8415. When used with textures, the syntax is
  8416.  
  8417.   texture {
  8418.     brick texture{T_Gold_1A},texture{Stone12}
  8419.   }
  8420.  
  8421.  
  8422. This is a block pattern which cannot use wave types, color_map, or  slope_map
  8423. modifiers.
  8424.  
  8425. 3.6.7.5          Bumps
  8426.  
  8427. The bumps pattern.
  8428.  
  8429. The bumps pattern was originally  designed  only  to  be  used  as  a  normal
  8430. pattern. It uses a very smooth, random noise function that creates  the  look
  8431. of rolling hills when scaled large or a bumpy orange peal when scaled  small.
  8432. Usually the bumps are about 1 unit apart.
  8433.  
  8434. When used as a normal, bumps uses a specialized normal perturbation function.
  8435. This means that the bumps pattern cannot be used with normal_map,  slope_map,
  8436. or wave type modifiers in a normal statement.
  8437.  
  8438. When used as  a  pigment  pattern  or  texture  pattern,  the  bumps  pattern
  8439. identical to bozo or spotted and is  similar  to  normal  bumps  but  is  not
  8440. identical as are most normals when compared to pigments. When used as pigment
  8441. or texture statements the bumps pattern  uses  the  ramp_wave  wave  type  by
  8442. default but may use any wave type. The pattern may be  used  with  color_map,
  8443. pigment_map, and texture_map.
  8444.  
  8445. 3.6.7.6          Checker
  8446.  
  8447. The checker pattern.
  8448.  
  8449. The checker pattern produces a checkered pattern  consisting  of  alternating
  8450. squares of COLOR_1 and COLOR_2. If no colors are specified then default  blue
  8451. and green colors are used.
  8452.  
  8453.   pigment { checker COLOR_1, COLOR_2 }
  8454.  
  8455.  
  8456. The checker pattern is actually a series of cubes that are one unit in  size.
  8457. Imagine a bunch of 1 inch cubes made from two different  colors  of  modeling
  8458. clay. Now imagine arranging the cubes in an  alternating  check  pattern  and
  8459. stacking them in layer after layer so that the  colors  still  alternated  in
  8460. every direction. Eventually you would have a  larger  cube.  The  pattern  of
  8461. checks on each side is what the POV-Ray checker pattern produces when applied
  8462. to a box object. Finally imagine cutting away at the cube until it is  carved
  8463. into a smooth sphere or any other shape. This is  what  the  checker  pattern
  8464. would look like on an object of any kind.
  8465.  
  8466. You may also use pigment statements in place of the colors. For example:
  8467.  
  8468.   pigment { checker pigment{Jade}, pigment{Black_Marble} }
  8469.  
  8470.  
  8471. When used with normals, the syntax is
  8472.  
  8473.   normal { checker BUMP_FLOAT }
  8474.  
  8475.  
  8476. Where BUMP_FLOAT is an optional bump size float value. You may also use  full
  8477. normal statements. For example:
  8478.  
  8479.   normal {
  8480.     checker normal{gradient x scale .2}, normal{gradient y scale .2}
  8481.   }
  8482.  
  8483.  
  8484. When used with textures, the syntax is...
  8485.  
  8486.   texture { checker texture{T_Wood_3A},texture{Stone12} }
  8487.  
  8488.  
  8489. This use of checker as a texture pattern replaces the special  tiles  texture
  8490. in previous versions of POV-Ray. You may still use tiles but it may be phased
  8491. out in future versions so checker textures are best.
  8492.  
  8493. This is a block pattern which cannot use wave types, color_map, or  slope_map
  8494. modifiers.
  8495.  
  8496. 3.6.7.7          Crackle
  8497.  
  8498. The crackle pattern.
  8499.  
  8500. The crackle pattern is set of random tiled polygons. With a large  scale  and
  8501. no turbulence it makes a pretty good stone wall or floor. With a small  scale
  8502. and no turbulence it makes a pretty good crackle ceramic  glaze.  Using  high
  8503. turbulence it makes a  good  marble  that  avoids  the  problem  of  apparent
  8504. parallel layers in traditional marble.
  8505.  
  8506. Mathematically, the set crackle(p)=0 is a 3D Voronoi diagram of  a  field  of
  8507. semi random points, and crackle(p)>0 is the distance from the set  along  the
  8508. shortest path (A Voronoi diagram is the  locus  of  points  equidistant  from
  8509. their 2 nearest neighbors from a set of disjoint points, like  the  membranes
  8510. in suds are to the centers of the bubbles).
  8511.  
  8512. The crackle pattern uses the ramp_wave wave type by default but may  use  any
  8513. wave type. The pattern may be used with color_map,  pigment_map,  normal_map,
  8514. slope_map and texture_map.
  8515.  
  8516. 3.6.7.8          Dents
  8517.  
  8518. The dents pattern.
  8519.  
  8520. The dents pattern was originally  designed  only  to  be  used  as  a  normal
  8521. pattern. It is especially interesting when used with  metallic  textures,  it
  8522. gives impressions into the metal surface  that  look  like  dents  have  been
  8523. beaten into the surface with a hammer. Usually the dents  are  about  1  unit
  8524. apart.
  8525.  
  8526. When used as a normal pattern, dents uses a specialized  normal  perturbation
  8527. function. This means that the dents pattern cannot be used  with  normal_map,
  8528. slope_map, or wave type modifiers in a normal statement.
  8529.  
  8530. When used as a pigment pattern or  texture  pattern,  the  dents  pattern  is
  8531. similar to normal dents but  is  not  identical  as  are  most  normals  when
  8532. compared to pigments. When used in pigment or texture  statements  the  dents
  8533. pattern uses the ramp_wave wave type by default but may use  any  wave  type.
  8534. The pattern may be used with color_map, pigment_map, and texture_map.
  8535.  
  8536. 3.6.7.9          Gradient
  8537.  
  8538. The gradient pattern.
  8539.  
  8540. One of the simplest patterns is the gradient pattern. It is specified as
  8541.  
  8542.   pigment {gradient VECTOR}
  8543.  
  8544.  
  8545. where VECTOR is a vector pointing in the direction that the colors blend. For
  8546. example:
  8547.  
  8548.    pigment { gradient x } // bands of color vary as you move
  8549.                           // along the "x" direction.
  8550.  
  8551.  
  8552. This produces a series of smooth bands of color  that  look  like  layers  of
  8553. color next to each other. Points at x=0 are the first color in the color map.
  8554. As the X location increases it smoothly turns to the last color at x=1.  Then
  8555. it starts over with the first again and gradually turns into the  last  color
  8556. at x=2. The pattern reverses for negative values of X. Using  gradient  y  or
  8557. gradient z makes the colors blend along the y or z axis. Any  vector  may  be
  8558. used but x, y and z are most common.
  8559.  
  8560. As  a  normal  pattern,  gradient  generates  a  saw-tooth  or  ramped  wave
  8561. appearance. The syntax is
  8562.  
  8563.    normal { gradient VECTOR, BUMP_FLOAT}
  8564.  
  8565.  
  8566. where the VECTOR giving the orientation  is  a  required  parameter  but  the
  8567. BUMP_FLOAT bump size which follows is optional.
  8568.  
  8569. The pattern uses the ramp_wave wave type by default  but  may  use  any  wave
  8570. type. The pattern  may  be  used  with  color_map,  pigment_map,  normal_map,
  8571. slope_map and texture_map.
  8572.  
  8573. 3.6.7.10         Granite
  8574.  
  8575. The granite pattern.
  8576.  
  8577. This pattern uses a simple 1/f fractal noise function to give a good  granite
  8578. pattern. This pattern is used with  creative  color  maps  in  STONES.INC  to
  8579. create some gorgeous layered stone textures.
  8580.  
  8581. As a normal pattern it creates an extremely bumpy surface that looks  like  a
  8582. gravel driveway or rough stone.
  8583.  
  8584. The pattern uses the ramp_wave wave type by default  but  may  use  any  wave
  8585. type. The pattern  may  be  used  with  color_map,  pigment_map,  normal_map,
  8586. slope_map and texture_map.
  8587.  
  8588. 3.6.7.11         Hexagon
  8589.  
  8590. The hexagon pattern is a block pattern that generates a repeating pattern  of
  8591. hexagons in the XZ plane.  In  this  instance  imagine  tall  rods  that  are
  8592. hexagonal in shape and are parallel to the Y axis and grouped in bundles like
  8593. shown in the example image. Three separate  colors  should  be  specified  as
  8594. follows:
  8595.  
  8596.   pigment {hexagon COLOR_1, COLOR_2, COLOR_3 }
  8597.  
  8598.  
  8599.      _____
  8600.     /     \
  8601.    /   C2  \_____
  8602.   |\       /     \
  8603.   | \_____/   C3  \
  8604.   | /     \       /|
  8605.    /   C1  \_____/ |
  8606.   |\       /|    | |
  8607.   | \_____/ |    | |
  8608.   | |     | |    | |
  8609.   | |     | |    | |
  8610.   | |     | |    | |
  8611.   | |     | |    | |
  8612.   | |     | |    |
  8613.   | |     | |    |
  8614.     |     |
  8615.     |     |
  8616. The hexagon pattern.
  8617.  
  8618. The three colors will repeat the pattern shown  above  with  hexagon  COLOR_1
  8619. centered at the origin, COLOR_2 in the +Z direction  and  COLOR_3  to  either
  8620. side. Each side of the hexagon is one unit  long.  The  hexagonal  "rods"  of
  8621. color extend infinitely in the  +Y  and  -Y  directions.  If  no  colors  are
  8622. specified then default blue, green, and red colors are used.
  8623.  
  8624. You may also use pigment statements in place of the colors. For example:
  8625.  
  8626.   pigment {
  8627.     hexagon pigment { Jade },
  8628.             pigment { White_Marble },
  8629.             pigment { Black_Marble }
  8630.   }
  8631.  
  8632.  
  8633. When used with normals, the syntax is
  8634.  
  8635.   normal { hexagon BUMP_FLOAT }
  8636.  
  8637.  
  8638. Where BUMP_FLOAT is an optional bump size float value. You may also use  full
  8639. normal statements. For example:
  8640.  
  8641.   normal {
  8642.     hexagon
  8643.       normal { gradient x scale .2 },
  8644.       normal { gradient y scale .2 },
  8645.       normal { bumps scale .2 }
  8646.   }
  8647.  
  8648.  
  8649. When used with textures, the syntax is...
  8650.  
  8651.   texture {
  8652.     hexagon
  8653.       texture { T_Gold_3A },
  8654.       texture { T_Wood_3A },
  8655.       texture { Stone12 }
  8656.   }
  8657.  
  8658.  
  8659. This is a block pattern which cannot use wave types, color_map, or  slope_map
  8660. modifiers.
  8661.  
  8662. 3.6.7.12         Leopard
  8663.  
  8664. The leopard pattern.
  8665.  
  8666. Leopard creates regular geometric pattern of circular spots.
  8667.  
  8668. The pattern uses the ramp_wave wave type by default  but  may  use  any  wave
  8669. type. The pattern  may  be  used  with  color_map,  pigment_map,  normal_map,
  8670. slope_map and texture_map.
  8671.  
  8672. 3.6.7.13         Mandel
  8673.  
  8674. The mandel pattern computes  the  standard  Mandelbrot  fractal  pattern  and
  8675. projects it onto the X-Y plane. It uses the X and Y  coordinates  to  compute
  8676. the Mandelbrot set. The pattern is specified with the keyword mandel followed
  8677. by an integer number. This number is the maximum number of iterations  to  be
  8678. used to compute the set. Typical values range from  10  up  to  256  but  any
  8679. positive integer may be used. For example:
  8680.  
  8681.   pigment {
  8682.     mandel 25
  8683.     color_map {
  8684.       [0.0  color Cyan]
  8685.       [0.3  color Yellow]
  8686.       [0.6  color Magenta]
  8687.       [1.0  color Cyan]
  8688.     }
  8689.     scale .5
  8690.   }
  8691.  
  8692.  
  8693. The value passed to the color map is computed by the formula:
  8694.  
  8695.   value = number_of_iterations / max_iterations
  8696.  
  8697.  
  8698. When used as a normal pattern, the syntax is...
  8699.  
  8700.   normal {
  8701.     mandel ITER, BUMP_AMOUNT
  8702.   }
  8703.  
  8704.  
  8705. where the required integer ITER value is optionally followed by a float  bump
  8706. size.
  8707.  
  8708. The pattern extends infinitely in the Z direction similar to a  planar  image
  8709. map. The pattern uses the ramp_wave wave type by default but may use any wave
  8710. type. The pattern  may  be  used  with  color_map,  pigment_map,  normal_map,
  8711. slope_map and texture_map.
  8712.  
  8713. 3.6.7.14         Marble
  8714.  
  8715. The marble pattern.
  8716.  
  8717. The marble pattern is very similar to the gradient x  pattern.  The  gradient
  8718. pattern uses a default ramp_wave wave type which means it  uses  colors  from
  8719. the color map from 0.0 up to 1.0 at location x=1 but then jumps back  to  the
  8720. first color for x > 1.0 and repeats the pattern again and again. However  the
  8721. marble pattern uses the triangle_wave wave type in which it  uses  the  color
  8722. map from 0 to 1 but then it reverses the map and blends from 1 back to  zero.
  8723. For example:
  8724.  
  8725.   pigment {
  8726.     gradient x
  8727.     color_map {
  8728.       [0.0  color Yellow]
  8729.       [1.0  color Cyan]
  8730.     }
  8731.   }
  8732.  
  8733.  
  8734. This blends from yellow to cyan and then it abruptly changes back  to  yellow
  8735. and repeats. However replacing gradient x with marble  smoothly  blends  from
  8736. yellow to cyan as the x coordinate goes from 0.0 to  0.5  and  then  smoothly
  8737. blends back from cyan to yellow by x=1.0.
  8738.  
  8739. Earlier versions of POV-Ray did not allow you to change wave types. Now  that
  8740. wave types can be changed for  most  any  pattern,  the  distinction  between
  8741. marble and gradient x is only a matter of default wave types.
  8742.  
  8743. When used with turbulence and an appropriate color map,  this  pattern  looks
  8744. like veins of color of real marble, jade or other types of stone. By default,
  8745. marble has no turbulence.
  8746.  
  8747. The pattern may be used with color_map,  pigment_map,  normal_map,  slope_map
  8748. and texture_map.
  8749.  
  8750. 3.6.7.15         Onion
  8751.  
  8752. The onion pattern.
  8753.  
  8754. Onion is a pattern of concentric spheres like the layers of  an  onion.  Each
  8755. layer is one unit thick.
  8756.  
  8757. The pattern uses the ramp_wave wave type by default  but  may  use  any  wave
  8758. type. The pattern  may  be  used  with  color_map,  pigment_map,  normal_map,
  8759. slope_map and texture_map.
  8760.  
  8761. 3.6.7.16         Quilted
  8762.  
  8763. The quilted pattern.
  8764.  
  8765. The quilted pattern was originally designed only  to  be  used  as  a  normal
  8766. pattern. The quilted pattern is so named because  it  can  create  a  pattern
  8767. somewhat like a quilt or a tiled surface. The squares are actually 3-D  cubes
  8768. that are 1 unit in size.
  8769.  
  8770. When used as a normal pattern  it  uses  a  specialized  normal  perturbation
  8771. function. This means that the quilted pattern cannot be used with normal_map,
  8772. slope_map, or wave type modifiers in a normal statement.
  8773.  
  8774. When used as a pigment pattern or texture pattern,  the  quilted  pattern  is
  8775. similar to normal quilted but is not  identical  as  are  most  normals  when
  8776. compared to pigments. When used in pigment or texture statements the  quilted
  8777. pattern uses the ramp_wave wave type by default but may use  any  wave  type.
  8778. The pattern may be used with color_map, pigment_map, and texture_map.
  8779.  
  8780. The two parameters, control0 and control1 are used to adjust the curvature of
  8781. the "seam" or "gouge" area between the "quilts". The syntax is:
  8782.  
  8783.   normal {
  8784.     quilted AMOUNT
  8785.     control0 FLOAT
  8786.     control1 FLOAT
  8787.   }
  8788.  
  8789.  
  8790. The values should generally be kept to around  the  0.0  to  1.0  range.  The
  8791. default value is 1.0 if none is specified. Think of this "gouge" between  the
  8792. tiles in cross-section as a sloped line:
  8793.  
  8794.   __           ___
  8795.     \         / <-control1
  8796.      \       /
  8797.       \     /
  8798.        \___/  <- control0
  8799. Quilted pattern controls.
  8800.  
  8801. This straight slope can be made to curve by adjusting the two control values.
  8802. The control values adjust the slope at the top and bottom  of  the  curve.  A
  8803. control values of 0 at both ends will give a linear slope,  as  shown  above,
  8804. yielding a hard edge. A control value of 1 at both  ends  will  give  an  "s"
  8805. shaped curve, resulting in a softer, more rounded edge.
  8806.  
  8807. 3.6.7.17         Radial
  8808.  
  8809. The radial pattern.
  8810.  
  8811. The radial pattern is a radial blend that wraps around the +Y axis. The color
  8812. for value 0.0 starts at the +X direction and wraps the color map around  from
  8813. east to west with 0.25 in the -Z direction, 0.5 in -X, 0.75 at +Z and back to
  8814. 1.0 at +X. Typically the pattern is used with a frequency modifier to  create
  8815. multiple bands that radiate from the Y axis.
  8816.  
  8817. The pattern uses the ramp_wave wave type by default  but  may  use  any  wave
  8818. type. The pattern  may  be  used  with  color_map,  pigment_map,  normal_map,
  8819. slope_map and texture_map.
  8820.  
  8821. 3.6.7.18         Ripples
  8822.  
  8823. The ripples pattern.
  8824.  
  8825. The ripples pattern was originally designed only  to  be  used  as  a  normal
  8826. pattern. It makes the surface look like ripples of water. The ripples radiate
  8827. from 10 random locations inside the unit cube area <0,0,0> to <1,1,1>.  Scale
  8828. the pattern to make the centers closer or farther apart.
  8829.  
  8830. Usually the ripples from any  given  center  are  about  1  unit  apart.  The
  8831. frequency keyword changes the spacing between ripples. The phase keyword  can
  8832. be used to move the ripples outwards for realistic animation.
  8833.  
  8834. The number of ripple  centers  can  be  changed  with  the  global  parameter
  8835. global_setting {number_of_waves FLOAT} somewhere in the scene.  This  affects
  8836. the entire scene. You cannot change the number of wave centers on  individual
  8837. patterns. See "global_settings" for details.
  8838.  
  8839. When used as a normal pattern, ripples uses a specialized normal perturbation
  8840. function. This means that the ripples pattern cannot be used with normal_map,
  8841. slope_map, or wave type modifiers in a normal statement.
  8842.  
  8843. When used in pigment or texture  statements  the  ripples  pattern  uses  the
  8844. ramp_wave wave type by default but may use any wave type. The pattern may  be
  8845. used with color_map, pigment_map, and texture_map.
  8846.  
  8847. 3.6.7.19         Spiral1
  8848.  
  8849. The spiral1 pattern.
  8850.  
  8851. The spiral1 pattern creates a spiral that winds around the y-axis similar  to
  8852. a screw. Its syntax is:
  8853.  
  8854.   pigment {
  8855.     spiral1 NUMBER_OF_ARMS
  8856.   }
  8857.  
  8858.  
  8859. The NUMBER_OF_ARMS-value determins how may "arms" are winding  around  the  y
  8860. axis.
  8861.  
  8862. The pattern uses the triangle_wave wave type by default but may use any  wave
  8863. type. The pattern  may  be  used  with  color_map,  pigment_map,  normal_map,
  8864. slope_map and texture_map.
  8865.  
  8866. 3.6.7.20         Spiral2
  8867.  
  8868. The spiral2 pattern.
  8869.  
  8870. The spiral2 pattern  is  a  modification  of  the  spiral1  pattern  with  an
  8871. extraordinary look.
  8872.  
  8873. The pattern uses the triangle_wave wave type by default but may use any  wave
  8874. type. The pattern  may  be  used  with  color_map,  pigment_map,  normal_map,
  8875. slope_map and texture_map.
  8876.  
  8877. 3.6.7.21         Spotted
  8878.  
  8879. The spotted pattern.
  8880.  
  8881. The spotted pattern is identical to  the  bozo  pattern.  Early  versions  of
  8882. POV-Ray did not allow turbulence to  be  used  with  spotted.  Now  that  any
  8883. pattern can use turbulence there is no difference between bozo  and  spotted.
  8884. See "bozo" for details.
  8885.  
  8886. 3.6.7.22         Waves
  8887.  
  8888. The waves pattern.
  8889.  
  8890. The waves pattern was originally  designed  only  to  be  used  as  a  normal
  8891. pattern. The waves pattern looks similar to the ripples  pattern  except  the
  8892. features are rounder and broader. The effect is to make waves that look  more
  8893. like deep ocean waves. The waves radiate from 10 random locations inside  the
  8894. unit cube area <0,0,0> to <1,1,1>. Scale the  pattern  to  make  the  centers
  8895. closer or farther apart.
  8896.  
  8897. Usually the waves from any given center are about 1 unit apart. The frequency
  8898. keyword changes the spacing between waves. The phase keyword can be  used  to
  8899. move the waves outwards for realistic animation.
  8900.  
  8901. The number of ripple  centers  can  be  changed  with  the  global  parameter
  8902. global_setting {number_of_waves FLOAT} somewhere in the scene.  This  affects
  8903. the entire scene. You cannot change the number of wave centers on  individual
  8904. patterns. See "global_settings" for details.
  8905.  
  8906. When used as a normal pattern, waves uses a specialized  normal  perturbation
  8907. function. This means that the waves pattern cannot be used  with  normal_map,
  8908. slope_map, or wave type modifiers in a normal statement.
  8909.  
  8910. When used in pigment  or  texture  statements  the  waves  pattern  uses  the
  8911. ramp_wave wave type by default but may use any wave type. The pattern may  be
  8912. used with color_map, pigment_map, and texture_map.
  8913.  
  8914. 3.6.7.23         Wood
  8915.  
  8916. The wood pattern.
  8917.  
  8918. The wood pattern consists of concentric cylinders centered  on  the  Z  axis.
  8919. When appropriately colored, the bands look like the growth rings and veins in
  8920. real wood. Small amounts of turbulence should be added to make it  look  more
  8921. realistic. By default, wood has no turbulence.
  8922.  
  8923. Unlike most patterns, the wood pattern uses the triangle_wave  wave  type  by
  8924. default. This means that like marble, wood uses color map values 0.0  to  1.0
  8925. then repeats the colors in reverse order from 1.0 to 0.0. However you may use
  8926. any  wave  type.  The  pattern  may  be  used  with  color_map,  pigment_map,
  8927. normal_map, slope_map and texture_map.
  8928.  
  8929. 3.6.7.24         Wrinkles
  8930.  
  8931. The wrinkles pattern.
  8932.  
  8933. The wrinkles pattern was originally designed only to  be  used  as  a  normal
  8934. pattern. It uses a 1/f noise pattern similar to granite but the  features  in
  8935. wrinkles are sharper. The pattern can be used to simulate wrinkled cellophane
  8936. or foil. It also makes an excellent stucco texture.
  8937.  
  8938. When used as a normal pattern  it  uses  a  specialized  normal  perturbation
  8939. function.  This  means  that  the  wrinkles  pattern  cannot  be  used  with
  8940. normal_map, slope_map, or wave type modifiers in a normal statement.
  8941.  
  8942. When used as a pigment pattern or texture pattern, the  wrinkles  pattern  is
  8943. similar to normal wrinkles but is not identical  as  are  most  normals  when
  8944. compared to pigments. When used in pigment or texture statements the wrinkles
  8945. pattern uses the ramp_wave wave type by default but may use  any  wave  type.
  8946. The pattern may be used with color_map, pigment_map, and texture_map.
  8947.  
  8948. 3.6.8            Pattern Modifiers
  8949.  
  8950. Pattern modifiers are statements or parameters which modify how a pattern  is
  8951. evaluated or tells what to do with the pattern. The modifiers  color_map  and
  8952. pigment_map apply only to pigments. See "pigment" . The modifiers  bump_size,
  8953. slope_map  and  normal_map  apply  only  to  normals.  See  "normal"  .  The
  8954. texture_map modifier can only be used with textures. See "texture_map" .
  8955.  
  8956. The pattern modifiers in the following section  can  be  used  with  pigment,
  8957. normal or texture patterns.
  8958.  
  8959. 3.6.8.1          Transforming Patterns
  8960.  
  8961. The most common pattern modifiers are the transformation modifiers translate,
  8962. rotate,  scale,  and   matrix.   For   details   on   these   commands   see
  8963. "Transformations" .
  8964.  
  8965. These modifiers may be placed inside pigment, normal and  texture  statements
  8966. to change the position, size and orientation of the patterns.
  8967.  
  8968. In general the order of transformations relative to other  pattern  modifiers
  8969. such as turbulence, color_map and other maps is not  important.  For  example
  8970. scaling before or after turbulence makes no  difference.  The  turbulence  is
  8971. done first, then the scaling regardless of which is specified first.  However
  8972. the order in which transformations are performed relative to warp  statements
  8973. is important. See "warps" for details.
  8974.  
  8975. 3.6.8.2          Frequency and Phase
  8976.  
  8977. The frequency and phase modifiers act  as  a  type  of  scale  and  translate
  8978. modifiers for color_map, pigment_map, normal_map, slope_map and  texture_map.
  8979. This discussion uses color_map as an example but the same principles apply to
  8980. pigment_map, ormal_map, slope_map and texture_map.
  8981.  
  8982. The frequency keyword adjusts the number of times that a  color  map  repeats
  8983. over one cycle of a pattern. For example gradient x covers color map values 0
  8984. to 1 over the range x=0 to x=1. By adding frequency 2.0 the color map repeats
  8985. twice over that same range. The same effect can be achieved using scale x*0.5
  8986. so the frequency keyword isn't that useful for patterns like gradient.
  8987.  
  8988. However the radial pattern wraps the color map around the +Y  axis  once.  If
  8989. you wanted two copies of the map (or 3 or 10 or 100) you'd have  to  build  a
  8990. bigger map. Adding frequency 2.0 causes the color map to be  used  twice  per
  8991. revolution. Try this:
  8992.  
  8993.   pigment {
  8994.     radial
  8995.     color_map{[0.5 color Red][0.5 color White]}
  8996.     frequency 6
  8997.   }
  8998.  
  8999.  
  9000. The result is 6 sets of red and white radial stripes evenly spaced around the
  9001. object.
  9002.  
  9003. The float after frequency can be any value. Values greater  than  1.0  causes
  9004. more than one copy of the map to be used. Values from  0.0  to  1.0  cause  a
  9005. fraction of the map to be used. Negative values reverses the map.
  9006.  
  9007. The phase value causes the map entries to be shifted so that the  map  starts
  9008. and ends at a different place. In the example above if you render  successive
  9009. frames at phase 0 then phase 0.1, phase 0.2 etc you could create an animation
  9010. that rotates the stripes. The same effect can be easily achieved by  rotating
  9011. the radial pigment using rotate y*Angle but there are other uses where  phase
  9012. can be handy.
  9013.  
  9014. Sometimes you create a great looking gradient or wood color map but you  want
  9015. the grain slightly adjusted in or out.  You  could  re-order  the  color  map
  9016. entries but that's a pain. A phase adjustment will shift everything but  keep
  9017. the same scale. Try animating a mandel pigment for a color  palette  rotation
  9018. effect.
  9019.  
  9020. Frequency and phase have no effect  on  block  patterns  checker,  brick  and
  9021. hexagon nor do they effect image_map, bump_map  or  material_map.  They  also
  9022. have no effect in normal statements when used with bumps, dents, quilted,  or
  9023. wrinkles because these normal patterns cannot use normal_map or slope_map.
  9024.  
  9025. They can be used with normal patterns ripples and waves even though these two
  9026. patterns cannot use normal_map or slope_map either. When used with ripples or
  9027. waves, frequency adjusts the space between features and phase can be adjusted
  9028. from 0.0 to 1.0 to cause the ripple or waves to move relative to their center
  9029. for animating the features.
  9030.  
  9031. These values work by applying the following formula:
  9032.  
  9033.   NEW_VALUE = fmod ( OLD_VALUE * FREQUENCY + PHASE, 1.0 )
  9034.  
  9035.  
  9036. 3.6.8.3          Waveform
  9037.  
  9038. Most patterns that take  color_map,  pigment_map,  slope_map,  normal_map  or
  9039. texture_map, use the entries in the map in order from 0.0 to 1.0 however  the
  9040. wood and marble patterns use the map from 0.0 to 1.0 and then reverses it and
  9041. runs it from 1.0 to 0.0. These differences can  easily  be  seen  when  using
  9042. these patterns are used as normal patterns with no  maps.  Patterns  such  as
  9043. gradient or onion generate a grove or slot that looks like a ramp that  drops
  9044. off sharply. This is called a ramp_wave wave type. However  wood  and  marble
  9045. slope upwards to a peak,  then  slope  down  again  in  a  triangle_wave.  In
  9046. previous versions of POV-Ray there was no way to change the wave  types.  You
  9047. could simulate a triangle wave on a ramp wave pattern by duplicating the  map
  9048. entries in reverse, however there was no way to use a ramp wave  on  wood  or
  9049. marble.
  9050.  
  9051. Now any pattern that takes a map can have the default wave  type  overridden.
  9052. For example:
  9053.  
  9054.   pigment { wood color_map { MyMap } ramp_wave }
  9055.  
  9056.  
  9057. Also available are sine_wave and scallop_wave types. These types are of  most
  9058. use in normal patterns as a type of built-in slope map. The  sine_wave  takes
  9059. the zig-zag of a ramp_wave and turns it  into  a  gentle  rolling  wave  with
  9060. smooth transitions. The scallop_wave uses the absolute value of the sine wave
  9061. which looks like corduroy when scaled small or like a stack of cylinders when
  9062. scaled larger.
  9063.  
  9064. Although these any of these wave types can be used for pigments,  normals  or
  9065. textures, the sine_wave and scallop_wave  types  are  not  as  noticeable  on
  9066. pigments or textures as they are for normals.
  9067.  
  9068. Wave types have no effect on block patterns checker, brick and hexagon nor do
  9069. they effect image_map, bump_map or material_map. They also have no effect  in
  9070. normal statements when used with bumps, dents, quilted, or  wrinkles  because
  9071. these normal patterns cannot use normal_map or slope_map.
  9072.  
  9073. 3.6.8.4          Turbulence
  9074.  
  9075. The keyword turbulence followed by a float or vector may be used to  stir  up
  9076. any pigment, normal, texture, irid or halo. A number of  optional  parameters
  9077. may be used with turbulence to control how it is computed. For example:
  9078.  
  9079.   pigment  {
  9080.     wood color_map { MyMap }
  9081.     turbulence TURB_VECTOR
  9082.     octaves FLOAT
  9083.     omega FLOAT
  9084.     lambda FLOAT
  9085.   }
  9086.  
  9087.  
  9088. Typical turbulence values range from the default 0.0 which is  no  turbulence
  9089. to 1.0 or more which is  very  turbulent.  If  a  vector  is  specified  then
  9090. different amounts of turbulence are applied in the x, y and z directions. For
  9091. example
  9092.  
  9093.   turbulence <1.0, 0.6, 0.1>
  9094.  
  9095.  
  9096. has much turbulence in the x direction, a moderate amount in the y  direction
  9097. and a small amount in the z direction.
  9098.  
  9099. Turbulence uses a random noise function called DNoise. This is similar to the
  9100. noise used in the bozo pattern except that instead of giving a  single  value
  9101. it gives a direction. You can think of it as the direction that the  wind  is
  9102. blowing at that spot. Points close together generate almost  the  same  value
  9103. but points far apart are randomly different.
  9104.  
  9105. In general the order of  turbulence  parameters  relative  to  other  pattern
  9106. modifiers such as transformations, color_map and other maps is not important.
  9107. For example scaling before or  after  turbulence  makes  no  difference.  The
  9108. turbulence is done first, then the scaling regardless of which  is  specified
  9109. first. See "warps" for a way to work around this behavior.
  9110.  
  9111. Turbulence uses DNoise to  push  a  point  around  in  several  steps  called
  9112. octaves. We locate the point we want to evaluate, then push it around  a  bit
  9113. using turbulence to get to a different  point  then  look  up  the  color  or
  9114. pattern of the new point.
  9115.  
  9116. It says in effect "Don't give me the color at this spot... take a few  random
  9117. steps in different directions and give me that color." Each step is typically
  9118. half as long as the one before. For example:
  9119.  
  9120.   P ------------------------->
  9121.            First Move        /
  9122.                             /
  9123.                            /
  9124.                           /Second
  9125.                          /  Move
  9126.                         /
  9127.                  ______/
  9128.                  \
  9129.                   \
  9130.                    Q - Final point.
  9131. Turbulence random walk.
  9132.  
  9133. The magnitude of these steps is controlled by the turbulence value. There are
  9134. three additional parameters which control how turbulence  is  computed.  They
  9135. are octaves, lambda and omega. Each is optional. Each is followed by a single
  9136. float value. Each has no effect when there is no turbulence.
  9137.  
  9138. 3.6.8.5          Octaves
  9139.  
  9140. The octaves value controls  the  number  of  steps  of  turbulence  that  are
  9141. computed. Legal values range from 1 to 10. The default value of 6 is a fairly
  9142. high value; you won't see much change by setting it to a higher value because
  9143. the extra steps are too small. Float values are truncated to  integer.  Using
  9144. smaller number of octaves gives  a  gentler,  wavy  turbulence  and  computes
  9145. faster. Higher octaves create more  jagged  or  fuzzy  turbulence  and  takes
  9146. longer to compute.
  9147.  
  9148. 3.6.8.6          Lambda
  9149.  
  9150. The lambda parameter controls how statistically different the random move  of
  9151. an octave is compared to its previous octave. The default value is 2.0  which
  9152. is quite  random.  Values  close  to  lambda  1.0  will  straighten  out  the
  9153. randomness of the path in  the  diagram  above.  The  zig-zag  steps  in  the
  9154. calculation are in nearly the same direction. Higher  values  can  look  more
  9155. "swirly" under some circumstances.
  9156.  
  9157. 3.6.8.7          Omega
  9158.  
  9159. The omega value controls how large each successive octave step is compared to
  9160. the previous value. Each successive octave of turbulence is multiplied by the
  9161. omega value. The default omega 0.5 means that each octave is 1/2 the size  of
  9162. the previous one. Higher omega values mean that 2nd, 3rd, 4th and up  octaves
  9163. contribute more turbulence giving a sharper,  "crinkly"  look  while  smaller
  9164. omegas give a fuzzy kind of turbulence that gets blurry in places.
  9165.  
  9166. 3.6.8.8          Warps
  9167.  
  9168. The warp statement is a pattern  modifier  that  is  similar  to  turbulence.
  9169. Turbulence works by taking the pattern evaluation point and pushing it  about
  9170. in  a  series  of  random  steps,  however  warps  push  the  point  in  very
  9171. well-defined, non-random, geometric ways. The warp statement  also  overcomes
  9172. some limitations of traditional turbulence and transformations by giving  the
  9173. user more control over the order in which turbulence, transformation and warp
  9174. modifiers are applied to the pattern.
  9175.  
  9176. Currently there are three types of warps but the syntax was designed to allow
  9177. future expansion. The first two, the repeat warp and the black_hole warp  are
  9178. new features for POV-Ray that modify the pattern in geometric ways. The other
  9179. warp provides an alternative way to specify turbulence.
  9180.  
  9181. The syntax for using a warp statement in a pigment is
  9182.  
  9183.   pigment {
  9184.     PATTERN_TYPE
  9185.     PIGMENT_MODIFIERS...
  9186.     warp { WARP_ITEMS...}
  9187.     OTHER_PIGMENT_MODIFIERS...
  9188.   }
  9189.  
  9190.  
  9191. Similarly warps may be used in normals and textures. You  may  have  as  many
  9192. separate warp statements as you like in each pattern. The placement  of  warp
  9193. statements relative to other modifiers such as color_map or turbulence is not
  9194. important. However placement of warp statements relative to each other and to
  9195. transformations  is  significant.  Multiple  warps  and  transformations  are
  9196. evaluated in the order  in  which  you  specify  them.  For  example  if  you
  9197. translate, then warp or warp, then translate, the results can be different.
  9198.  
  9199. 3.6.8.8.1        Black Hole Warp
  9200.  
  9201. A black hole is so named because of its similarity to real black holes.  Just
  9202. like the real thing, you cannot actually see a black hole. The  only  way  to
  9203. detect its presence is by the effect it  has  on  things  that  surround  it.
  9204. Unlike the real thing, however, it won't swallow you  up  and  compress  your
  9205. entire body to an volume of, say, 2.0*10^-10 microns in diameter if  you  get
  9206. too close (We're working on that part).
  9207.  
  9208. Take, for example, a woodgrain. Using POV-Ray's normal turbulence  and  other
  9209. texture modifier functions, you can get a  nice,  random  appearance  to  the
  9210. grain. But in its randomness it is regular  ---  it  is  regularly  random  !
  9211. Putting in a black hole allows you to create a  localised  disturbance  in  a
  9212. woodgrain in either one or multiple locations. The black hole  can  have  the
  9213. effect of either 'sucking' the surrounding texture into itself (like the real
  9214. thing) or 'pushing' it away. In the latter case, applied to a  woodgrain,  it
  9215. would look to the viewer as if there were a knothole in  the  wood.  In  this
  9216. text we use a Woodgrain regularly  as  an  example,  because  it  is  ideally
  9217. suitable to explaining Black Holes. However, Black Holes may in fact be  used
  9218. with any texture.
  9219.  
  9220. The effect that the black hole has  on  the  texture  can  be  specified;  by
  9221. default,   it   'sucks'   with   the   strength   calculated   expotentially
  9222. (inverse-square). You can change this if you like.
  9223.  
  9224. Black Holes may be used anywhere a Warp is permitted. The syntax is:
  9225.  
  9226.   warp
  9227.   {
  9228.     black_hole <CENTER>, RADIUS
  9229.     [falloff VALUE]
  9230.     [strength VALUE]
  9231.     [repeat <VECTOR>]
  9232.     [turbulence <VECTOR>]
  9233.     [inverse]
  9234.   }
  9235.  
  9236.  
  9237. Some examples are given by
  9238.  
  9239.   warp
  9240.   {
  9241.     black_hole <0, 0, 0>, 0.5
  9242.   }
  9243.  
  9244.   warp
  9245.   {
  9246.     black_hole <0.15, 0.125, 0>, 0.5
  9247.     falloff 7
  9248.     strength 1.0
  9249.     repeat <1.25, 1.25, 0>
  9250.     turbulence <0.25, 0.25, 0>
  9251.     inverse
  9252.   }
  9253.  
  9254.   warp
  9255.   {
  9256.     black_hole <0, 0, 0>, 1.0
  9257.     falloff 2
  9258.     strength 2
  9259.     inverse
  9260.   }
  9261.  
  9262.  
  9263. In order to fully understand how a black hole works, it is important to  know
  9264. the theory behind it. A black hole (or any warp) works by taking a point  and
  9265. 'perturbing' it to another location. The amount of  perturbation  depends  on
  9266. the strength of the black hole at the original point passed  in  to  it.  The
  9267. amount of perturbation directly relates to the amount of visual movement that
  9268. you can see occur in a texture. The stronger the  black  hole  at  the  input
  9269. co-ordinate, the more that original co-ordinate is moved to another  location
  9270. (either closer to or further away from the center of the black hole.)
  9271.  
  9272. Movement always occurs on the vector that exists between the input point  and
  9273. the center of the black hole (which I will now abbreviate BH for brevity).
  9274.  
  9275. Black Holes are considered to be spheres. For a point to be affected by a BH,
  9276. it must be within the sphere's volume.
  9277.  
  9278. Suppose you have a BH at <1,1,1>, and a point at <1,2,1>. If  this  point  is
  9279. perturbed by a total amount of +1 unit, then its  new  location  is  <1,3,1>,
  9280. which is on a direct line extrapolated from the vector  between  <1,1,1>  and
  9281. <1,2,1>. In this case the point is 'pushed' away from the BH,  which  is  not
  9282. normal behaviour but is good for demonstration purposes.
  9283.  
  9284. The internal properties of a black hole are as follows.
  9285.  
  9286.   Center            The center of the black hole.
  9287.   Radius            Its radius.
  9288.   Falloff           The power of two by which the effect falls  off  (default
  9289.                     2.)
  9290.   Strength          The magnitude of the transformation effect (see below.)
  9291.   Inverted          If set, 'push' points away instead of 'pulling' them  in.
  9292.  
  9293.   Repeat            If set, we have many black holes instead of one.
  9294.   Turbulence        If set, each new repeated BH's position is uncertain.
  9295.   Repeat_Vector     The <x,y,z> factor to repeat by.
  9296.   Turbulence_Vector The maximum <x,y,z> factor for turbulence randomness.
  9297.  
  9298.  
  9299. Each of these are discussed below.
  9300.  
  9301. Center: A vector defining the center of the sphere that represents the  black
  9302. hole. If the BH has Repeat set, it is the offset within each block.
  9303.  
  9304. Radius: A number giving the length, in units, of the  radius  of  the  sphere
  9305. that represents the black hole.
  9306.  
  9307. If a point is not within radius units of <center>, it cannot be  affected  by
  9308. the BH and will not be perturbed.
  9309.  
  9310. Falloff: The power by which the effect of  the  black  hole  falls  off.  The
  9311. default is two. The force of the  black  hole  at  any  given  point,  before
  9312. applying the 'Strength' modifier, is as follows.
  9313.  
  9314. First, convert the distance from the point to the center to a  proportion  (0
  9315. to 1) that the point is from the edge of the  black  hole.  A  point  on  the
  9316. perimeter of the black hole will be 0.0 ; a point at the centre will be 1.0 ;
  9317. a point exactly halfway will be 0.5, and so forth.
  9318.  
  9319. Mentally you can consider this to be a 'closeness' factor. A closeness of 1.0
  9320. is as close as you can get to the center (i.e. *at* the center), a  closeness
  9321. of 0.0 is as far away as you can get from the center and still be inside  the
  9322. black hole, and a closeness of 0.5 means the point is exactly halfway between
  9323. the two.
  9324.  
  9325. Call this value 'C'. Raise C to the power specified in 'Falloff'. By  default
  9326. Falloff
  9327. is 2, so this is C^2 or C squared. The resulting value is the  force  of  the
  9328. black hole at that exact location and is used, after applying the  'Strength'
  9329. scaling factor as described  below,  to  determine  how  much  the  point  is
  9330. perturbed in space.
  9331.  
  9332. For example, if C is 0.5, then the force is 0.5^2, or 0.25. If C is 0.25, the
  9333. force is 0.125. But if C is exactly 1.0, the force is 1.0.
  9334.  
  9335. Recall that as C gets smaller, the point is farther from the  center  of  the
  9336. black hole. Using the default power of 2, you can see that as C reduces,  the
  9337. force reduces expotentially in an inverse-square relationship.
  9338.  
  9339. Put in plain english, it means that the force is much stronger (by a power of
  9340. two) towards the center than it is at the outside.
  9341.  
  9342. By increasing Falloff, you can increase the magnitude  of  the  falloff  ;  a
  9343. large value will mean points towards the perimeter will hardly be affected at
  9344. all and points towards the center will be affected strongly.
  9345.  
  9346. A value of 1.0 for falloff will mean that the effect is linear ; a point that
  9347. is exactly halfway to the center of the black hole  will  be  affected  by  a
  9348. force of exactly 0.5.
  9349.  
  9350. A value of Falloff of less than one but greater than zero means that  as  you
  9351. get closer to the outside, the force *increases* rather than decreases.  This
  9352. can have some uses but there is a side effect ; recall that the effect  of  a
  9353. black hole ceases outside its perimiter. This means that points  just  within
  9354. the permiter will be affected strongly and those just  outside  not  at  all.
  9355. This would lead to a visible border, shaped as a sphere.
  9356.  
  9357. A value for Falloff of 0 would mean that the  force  would  be  1.0  for  all
  9358. points within the BH, since any number > 0 raised to the power of 0 is 1.0.
  9359.  
  9360. The magnitude of the movement of the point is  determined  basically  by  the
  9361. value of force after scaling. We'll consider  scaling  later.  Lets  take  an
  9362. example.
  9363.  
  9364. Suppose we have a black hole of radius 2.0, and a point that is  exactly  1.0
  9365. units from the center. That means it is exactly half-way to  the  center  and
  9366. that C would be 0.5. If we use the default falloff of 2, the  force  at  that
  9367. point is 0.5^2, or 0.25. What this means is that we must move  the  point  by
  9368. 0.25 of its distance from the center. In this case it is 1.0 units  from  the
  9369. center, so we move it by 1.0*0.25, or 0.25 units. This gives a final distance
  9370. of 1.0-(1.0*0.25) or 0.75 units from the center, on a direct line in 3D space
  9371. between the original position and the center.
  9372.  
  9373. If the point were part of, say, a wood grain, the wood grain would appear  to
  9374. bend towards the (invisible) center of the BH. If  the  'Inverse'  flag  were
  9375. set, however, it would be 'pushed' away, meaning its final position would  be
  9376. 1.0+(1.0*0.25), or 1.25 units from the center.
  9377.  
  9378. Strength: The 'Strength' gives you a bit more control over how much  a  point
  9379. is perturbed by the black hole. Basically, the force of the  black  hole  (as
  9380. determined above) is multipled by the value of Strength,  which  defaults  to
  9381. 1.0. If you set Strength to 0.5, for example, all  points  within  the  black
  9382. hole will be moved by only half as much as they would have been. If  you  set
  9383. it to 2.0, they will be moved twice as much.
  9384.  
  9385. There is a rider to the latter example, though - the movement is clipped to a
  9386. maximum of the points original distance from the center. That is  to  say,  a
  9387. point that is 0.75 units from the center may only be moved by  a  maximum  of
  9388. 0.75 units either towards the center or away from it, regardless of the value
  9389. of Strength. The result of this clipping is that you will have an 'exclusion'
  9390. area near the centre of the black hole where all  points  whose  final  force
  9391. value exceeded or equalled 1.0 were moved by a fixed amount.
  9392.  
  9393. Inverted: If Inverted is set,  points  are  'pushed'  away  from  the  center
  9394. instead of being pulled in.
  9395.  
  9396. Repeat: Repeat allows you to simulate the effect of many black holes  without
  9397. having to explicitly declare them. Repeat is a vector that tells  POV-Ray  to
  9398. use this black hole at multiple locations.
  9399.  
  9400. If you're not interested in the theory behind all this, just skim  this  next
  9401. text and use the values given in the summary below.
  9402.  
  9403. Using repeat logically divides your scene up  into  cubes,  the  first  being
  9404. located at <0,0,0> and going to <repeat>. i.e. suppose your repeat vector was
  9405. <1,5,2>, the first cube would be from <0,0,0> to <1,5,2>.  These  repeat,  so
  9406. there would be one at <-1,-5,-2>, <1,5,2>, <2,10,4>,  and  so  forth  in  all
  9407. directions, ad infinitum.
  9408.  
  9409. Instead of the center of the black hole specifying an  absolute  location  in
  9410. your scene, when you use repeat, the center is an offset into each block.  It
  9411. is only possible to use positive offsets ; using negative values will produce
  9412. undefined results.
  9413.  
  9414. Suppose your center was <0.5,1,0.25> and the repeat vector is  <2,2,2>.  This
  9415. gives us a block at <0,0,0> and <2,2,2>, etc. The centers  of  the  BH's  for
  9416. these blocks would be  <0,0,0>  +  <0.5,1.0,0.25>  i.e.  <0.5,1.0,0.25>,  and
  9417. <2,2,2> + <0.5,1.0,0.25>, i.e. <2,5,3.0,2.25>.
  9418.  
  9419. Due to the way repeats are calculated internally, there is a  restriction  on
  9420. the values you specify for the repeat vector. Basically, each black hole must
  9421. be totally enclosed within each block (or cube), with no part crossing into a
  9422. neighbouring one. This means that, for each of the X, Y and Z dimensions
  9423.  
  9424. the offset of the center may not be less than  the  radius,  and  the  repeat
  9425. value for that dimension must be >= the center plus the radius
  9426.  
  9427. since any other values would allow the black hole to cross  a  boundary.  Put
  9428. another way, for each of X, Y and Z
  9429.  
  9430. radius <= offset of center <= repeat - radius
  9431.  
  9432. If the repeat vector in any dimension is too small to fit this  criteria,  it
  9433. will be increased and a warning message issued. If the center  is  less  than
  9434. the radius it will also be moved but no message will be issued.
  9435.  
  9436. Note that none of the above should be read to mean  that  you  can't  overlap
  9437. black holes. You most certainly can and in fact this can  produce  some  most
  9438. useful effects. The restriction only applies to elements of the *same*  black
  9439. hole which is repeating. You can  declare  a  second  black  hole  that  also
  9440. repeats, and its elements can quite happily overlap the first and causing the
  9441. appropriate interactions.
  9442.  
  9443. It is legal for the repeat value for any dimension  to  be  0,  meaning  that
  9444. POV-Ray will not repeat the black hole in that direction.
  9445.  
  9446. Turbulence: Turbulence can only be used with repeat. It allows an element  of
  9447. randomness to be inserted into the way the black holes  repeat,  to  cause  a
  9448. more 'natural' look. A good example would be an array of  knotholes  in  wood
  9449. --- it would look rather artificial if each knothole were an  exact  distance
  9450. from the previous.
  9451.  
  9452. The 'turbulence vector' is a measurement that is  added  to  each  individual
  9453. back hole in an array, after each axis  of  the  vector  is  multipled  by  a
  9454. different
  9455. random amount ranging from 0 to 1.
  9456.  
  9457. For example, suppose you have a repeating element of a BH that is supposed to
  9458. be at <2,2,2>. You have specified an turbulence vector  of  <4,5,3>,  meaning
  9459. you want the position to be able to vary by no more than 1.0 units in  the  X
  9460. direction, 3.0 units in the Y direction and 2.0 in Z.  This  means  that  the
  9461. valid ranges of the new position are as follows
  9462.  
  9463. X c Z can be from 2 to 5.
  9464.  
  9465. The resulting actual position of the black hole's center for that  particular
  9466. repeat element is random (but consistent, so renders will be repeatable)  and
  9467. somewhere within the above co-ordinates.
  9468.  
  9469. There is a rider on the use of turbulence, which basically  is  the  same  as
  9470. that of the repeat vector ; you can't specify a value  which  would  cause  a
  9471. black hole to potentially cross outside of its particular block.
  9472.  
  9473. Since POV-Ray doesn't know in advance how much a position will be changed due
  9474. to the random nature of the changes, it enforces a rule that  is  similar  to
  9475. the one for repeat, except it adds the maximum possible  variation  for  each
  9476. axis to the center. For example, suppose you had a black hole with  a  center
  9477. of <1.0, 1.0, 1.0>, radius of 0.5, and a turbulence of  <0.5,  0.25,  0>  ---
  9478. normally, the mimimum repeat would be <1.5, 1.5, 1.5>. However, now  we  take
  9479. into account the turbulence, meaning the minimum repeat  vector  is  actually
  9480. <2.0, 1.75, 1.5>.
  9481.  
  9482. Repeat summarized: For each of X, Y and Z, the offset of the center  must  be
  9483. >= radius, and the value  of  the  repeat  must  be  >=  center  +  radius  +
  9484. turbulence, the exception being that repeat may be 0 for any dimension, which
  9485. means do not repeat in that direction.
  9486.  
  9487. 3.6.8.8.2        Repeat Warp
  9488.  
  9489. The repeat warp causes a section of the pattern to be repeated over and over.
  9490. It takes a slice  out  of  the  pattern  and  makes  multiple  copies  of  it
  9491. side-by-side. The warp has many uses but was originally designed to  make  it
  9492. easy to model wood veneer textures. Veneer is made by taking very thin slices
  9493. from a log and placing them side-by-side on some other backing material.  You
  9494. see side-by-side nearly identical ring patterns but  each  will  be  a  slice
  9495. perhaps 1/32th of an inch deeper.
  9496.  
  9497. The syntax for a repeat warp is
  9498.  
  9499.   warp { repeat VECTOR  offset VECTOR  flip VECTOR }
  9500.  
  9501.  
  9502. The repeat vector specifies the direction in which the  pattern  repeats  and
  9503. the width of the repeated area. This vector must lie entirely along an  axis.
  9504. In other words, two of its three components must be 0. For example:
  9505.  
  9506.   pigment {
  9507.     wood
  9508.     warp {repeat 2*x}
  9509.   }
  9510.  
  9511.  
  9512. which means that from x=0 to x=2 you get whatever the pattern usually is. But
  9513. from x=2 to x=4 you get the same thing exactly shifted 2 units over in the  x
  9514. direction. To  evaluate  it  you  simply  take  the  X-coordinate  modulo  2.
  9515. Unfortunately you get  exact  duplicates  which  isn't  very  realistic.  The
  9516. optional offset vector tells how much to translate the pattern each  time  it
  9517. repeats. For example
  9518.  
  9519.   pigment {
  9520.     wood
  9521.     warp {repeat x*2  offset z*0.05}
  9522.   }
  9523.  
  9524.  
  9525. this means that we slice the first copy from x=0 to x=2 at z=0 but at x=2  to
  9526. x=4 we offset to z=0.05. In the 4 to 6 interval we slice at  z=0.10.  At  the
  9527. Nth copy we slice at z*N*0.05. Thus each copy is  slightly  different.  There
  9528. are no restrictions on the offset vector.
  9529.  
  9530. Finally the flip vector causes the pattern to be flipped  or  mirrored  every
  9531. other copy of the pattern. The first copy of  the  pattern  in  the  positive
  9532. direction from the axis is not flipped; the next farther is; the next is not,
  9533. etc. The flip vector is a 3 component x,y,z  vector  but  each  component  is
  9534. treated as a boolean value that tells if you should or should not flip  along
  9535. a given axis. For example:
  9536.  
  9537.   pigment {
  9538.     wood
  9539.     warp {repeat 2*x  flip <1,1,0>}
  9540.   }
  9541.  
  9542.  
  9543. means that every other copy of the pattern will be mirrored about the X and Y
  9544. axis but not the Z axis. A non-zero value means flip and zero  means  do  not
  9545. flip about that axis. The magnitude of the values in the flip vector  doesn't
  9546. matter.
  9547.  
  9548. 3.6.8.8.3        Turbulence Warp
  9549.  
  9550. The POV-Ray language contains an ambiguity and  limitation  on  the  way  you
  9551. specify turbulence and transformations such as translate, rotate,  scale  and
  9552. matrix transforms. Usually the turbulence is done first. Then ALL  translate,
  9553. rotate,  scale  and  matrix  operations  are  always  done  after  turbulence
  9554. regardless of the order in which you specify them. For example this
  9555.  
  9556.  pigment {
  9557.    wood
  9558.    scale .5
  9559.    turbulence .2
  9560.  }
  9561.  
  9562.  
  9563. works exactly the same as
  9564.  
  9565.  pigment {
  9566.    wood
  9567.    turbulence .2
  9568.    scale .5
  9569.  }
  9570.  
  9571.  
  9572. The turbulence is always first. A better example of this limitation  is  with
  9573. uneven turbulence and rotations.
  9574.  
  9575.   pigment {
  9576.     wood
  9577.     turbulence 0.5*y
  9578.     rotate z*60
  9579.   }
  9580.  
  9581.   // as compared to
  9582.  
  9583.   pigment {
  9584.    wood
  9585.    rotate z*60
  9586.    turbulence 0.5*y
  9587.   }
  9588.  
  9589.  
  9590. The results will be the same either way even though  you'd  think  it  should
  9591. look different.
  9592.  
  9593. We cannot change this basic behavior in POV-Ray now because  lots  of  scenes
  9594. would potentially render differently if suddenly the order transformation  vs
  9595. turbulence suddenly mattered when in the past, it didn't.
  9596.  
  9597. However, by specifying our turbulence inside warp statement you tell  POV-Ray
  9598. that the order in which  turbulence,  transformations  and  other  warps  are
  9599. applied is significant. Here's an example of a turbulence warp.
  9600.  
  9601.   warp { turbulence <0,1,1> octaves 3 lambda 1.5 omega 0.3 }
  9602.  
  9603.  
  9604. The significance is that this
  9605.  
  9606.  pigment {
  9607.    wood
  9608.    translate <1,2,3> rotate x*45 scale 2
  9609.    warp { turbulence <0,1,1> octaves 3 lambda 1.5 omega 0.3 }
  9610.  }
  9611.  
  9612.  
  9613. produces different results than this...
  9614.  
  9615.  pigment {
  9616.    wood
  9617.    warp { turbulence <0,1,1> octaves 3 lambda 1.5 omega 0.3 }
  9618.    translate <1,2,3> rotate x*45 scale 2
  9619.  }
  9620.  
  9621.  
  9622. You may specify turbulence without using a warp statement. However you cannot
  9623. control the order in which they are evaluated unless you put them in a  warp.
  9624.  
  9625.  
  9626. The evaluation rules are as follows:
  9627.  
  9628.   1) First any turbulence not inside a warp statement is  applied  regardless
  9629.      of the order in which it appears relative to warps or transformations.
  9630.   2) Next each warp statement, translate, rotate, scale or matrix one-by-one,
  9631.      is applied in the order the user specifies. If you want turbulence  done
  9632.      in a specific order, you simply specify it inside a warp in  the  proper
  9633.      place.
  9634.  
  9635. 3.6.8.9          Bitmap modifiers
  9636.  
  9637. A bitmap modifier is a modifier used inside an "image_map"  ,  "bump_map"  or
  9638. "material_map" to specify how the 2-D bitmap is to  be  applied  to  the  3-D
  9639. surface. Several bitmap modifiers apply to specific kinds of  maps  and  they
  9640. are covered in the appropriate sections. The bitmap  modifiers  discussed  in
  9641. the following sections are applicable to all three types of bitmaps.
  9642.  
  9643. 3.6.8.9.1        The once Option
  9644.  
  9645. Normally there are an infinite number of repeating image_maps, bump_maps,  or
  9646. material_maps created over every unit square of the X-Y plane like tiles.  By
  9647. adding the keyword once after a file name, you can eliminate all other copies
  9648. of the map except the one at (0,0) to (1,1).  In  image_maps,  areas  outside
  9649. this unit square are  treated  as  fully  transparent.  In  bump_maps,  areas
  9650. outside this unit square are  left  flat  with  no  normal  modification.  In
  9651. material_maps, areas outside this unit square are  textured  with  the  first
  9652. texture of the texture list.
  9653.  
  9654. For example:
  9655.  
  9656.   image_map {
  9657.     gif "mypic.gif"
  9658.     once
  9659.   }
  9660.  
  9661.  
  9662. 3.6.8.9.2        The "map_type" Option
  9663.  
  9664. The default projection of the bump onto the X-Y plane is called a planar  map
  9665. type . This option may be changed by adding the map_type keyword followed  by
  9666. a number specifying the way to wrap the bump around the object.
  9667.  
  9668. A map_type 0 gives the default planar mapping already described.
  9669.  
  9670. A map_type 1 is a spherical mapping. It assumes that the object is  a  sphere
  9671. of any size sitting at the origin. The Y axis is the north/south pole of  the
  9672. spherical mapping. The top and bottom edges of the bitmap just touch the pole
  9673. regardless of any scaling. The left edge of the bitmap begins at the positive
  9674. X axis and wraps the pattern around the sphere from "west" to "east" in a  -Y
  9675. rotation. The pattern covers the sphere exactly once. The once keyword has no
  9676. meaning for this type.
  9677.  
  9678. With map_type 2 you get a cylindrical mapping. It assumes that a cylinder  of
  9679. any diameter lies along the  Y  axis.  The  bump  pattern  wraps  around  the
  9680. cylinder just like the spherical map but remains 1 unit tall from y=0 to y=1.
  9681. This band of the pattern is repeated at all heights unless the  once  keyword
  9682. is applied.
  9683.  
  9684. Finally map_type 5 is a torus or donut shaped  mapping.  It  assumes  that  a
  9685. torus of major radius 1 sits at the origin in the X-Z plane. The  pattern  is
  9686. wrapped around similar to spherical or cylindrical maps. However the top  and
  9687. bottom edges of the map wrap over and under the torus where  they  meet  each
  9688. other on the inner rim.
  9689.  
  9690. Types 3 and 4 are still under development.
  9691.  
  9692. For example:
  9693.  
  9694.   sphere{<0,0,0>,1
  9695.     pigment{
  9696.       image_map {
  9697.         gif "world.gif"
  9698.         map_type 1
  9699.       }
  9700.     }
  9701.   }
  9702.  
  9703.  
  9704. 3.6.8.9.3        The interpolate Option
  9705.  
  9706. Adding the interpolate keyword can smooth the jagged look of a  bitmap.  When
  9707. POV-Ray asks an image_map color or a bump amount for a  bump  map,  it  often
  9708. asks for a point that is not directly on  top  of  one  pixel,  but  sort  of
  9709. between  several  different  colored  pixels.  Interpolations   returns   an
  9710. "in-between" value so that the steps between the pixels in the map will  look
  9711. smoother.
  9712.  
  9713. Although  interpolate  is  legal  in  material_maps,  the  color  index   is
  9714. interpolated before the texture is chosen. It does not interpolate the  final
  9715. color as you might hope it would. In general, interpolation  of  material_map
  9716. serves no useful purpose but this may be fixed in future versions.
  9717.  
  9718. There are currently two types of interpolation:
  9719.  
  9720.   Normalized Distance -- interpolate 4
  9721.   Bilinear            -- interpolate 2
  9722.  
  9723.  
  9724. For example:
  9725.  
  9726.   image_map {
  9727.     gif "mypic.gif"
  9728.     interpolate 2
  9729.   }
  9730.  
  9731.  
  9732. Default is no interpolation. Normalized distance is the  slightly  faster  of
  9733. the two, bilinear does a better job of picking the between  color.  Normally,
  9734. bilinear is used.
  9735.  
  9736. If your map looks jaggy, try using interpolation instead of going to a higher
  9737. resolution image. The results can be very good.
  9738.  
  9739. 3.7              Atmospheric Effects
  9740.  
  9741. Atmospheric effects are a loosely-knit group  of  features  that  affect  the
  9742. background and/or the atmosphere enclosing the scene.  POV-Ray  includes  the
  9743. ability to render a number of atmospheric effects, such as fog,  haze,  mist,
  9744. rainbows, and skies.
  9745.  
  9746. 3.7.1            Atmosphere
  9747.  
  9748. Computer generated images normally assume a vacuum space that does not  allow
  9749. the rendering of natural phenomena like  smoke,  light  beams,  etc.  A  very
  9750. simple approach to add fog to a scene is explained in section  "Fog"  .  This
  9751. kind of fog does not interact with any light sources though. It will not show
  9752. light beams or other effects and is therefore not very realistic.
  9753.  
  9754. The atmosphere effect overcomes some of the fog's limitations by  calculating
  9755. the interaction between light and  the  particles  in  the  atmosphere  using
  9756. volume sampling. Thus shaft of light beams will become  visible  and  objects
  9757. will cast shadows "onto" the smoke or fog.
  9758.  
  9759. The syntax of the atmosphere is:
  9760.  
  9761.   atmosphere {
  9762.     type TYPE
  9763.     distance DISTANCE
  9764.     [ scattering SCATTERING ]
  9765.     [ eccentricity ECCENTRICITY ]
  9766.     [ samples SAMPLES ]
  9767.     [ jitter JITTER ]
  9768.     [ aa_threshold AA_THRESHOLD ]
  9769.     [ aa_level AA_LEVEL ]
  9770.     [ color <COLOUR> ]
  9771.   }
  9772.  
  9773.  
  9774. The "type" keyword determines the type of scattering model to be used.  There
  9775. are  five  different  phase  functions  representing  the  different  models:
  9776. isotropic, Rayleigh, Mie (haze and murky atmosphere) and Henyey-Greenstein.
  9777.  
  9778. Isotropic scattering is  the  simplest  form  of  scattering  because  it  is
  9779. independent of direction. The amount of light scattered by particles  in  the
  9780. atmosphere does not depend on the angle between the viewing direction and the
  9781. incoming light.
  9782.  
  9783. Rayleigh scattering models the scattering for extremely small particles  such
  9784. as molecules of the air.  The  amount  of  scattered  light  depends  on  the
  9785. incident light angle. It is largest when the incident light  is  parallel  or
  9786. anti-parallel to the viewing direction and smallest when the  incident  light
  9787. is perpendicular to the viewing direction. You should note that the  Rayleigh
  9788. model used here does not take the dependency of scattering on the  wavelength
  9789. into account.
  9790.  
  9791. The Mie scattering is used for relatively small particles such  as  miniscule
  9792. water droplets of fog, cloud particles, and  particles  responsible  for  the
  9793. polluted sky. In this model the scattering is extremely  directional  in  the
  9794. forward direction i.e. the amount of scattered  light  is  largest  when  the
  9795. incident light is anti-parallel to the  viewing  direction  (the  light  goes
  9796. directly to the viewer). It is smallest when the incident light  is  parallel
  9797. to the viewing direction. The haze and  murky  atmosphere  models  differ  in
  9798. their scattering characteristics. The murky model is  much  more  directional
  9799. than the haze model.
  9800.  
  9801. The Henyey-Greenstein scattering is based on an analytical function  and  can
  9802. be used to model a large variety of different scattering types. The  function
  9803. models an ellipse with a given eccentricity e. This eccentricity is given  by
  9804. the optional keyword  "eccentricity".  A  value  of  zero  defines  isotropic
  9805. scattering while positive values lead to scattering in the direction  of  the
  9806. light and negative values lead to scattering in the opposite direction of the
  9807. light. Larger values of e (or smaller values in the negative  case)  increase
  9808. the directional property of the scattering.
  9809.  
  9810. The easiest way to use the different scattering types will be to declare some
  9811. constants and use those in your atmosphere definition:
  9812.  
  9813.   #declare ISOTROPIC_SCATTERING         = 1
  9814.   #declare MIE_HAZY_SCATTERING          = 2
  9815.   #declare MIE_MURKY_SCATTERING         = 3
  9816.   #declare RAYLEIGH_SCATTERING          = 4
  9817.   #declare HENYEY_GREENSTEIN_SCATTERING = 5
  9818.  
  9819.  
  9820. The "distance" keyword is used to determine the density of the  particles  in
  9821. the atmosphere. This density  is  constant  for  the  whole  atmosphere.  The
  9822. distance parameter works in the same way as the fog distance.
  9823.  
  9824. With the "scattering" keyword you can change the amount of  scattering.  This
  9825. is useful to fit the intensity of  the  scattered  light  to  your  and  your
  9826. scene's needs.
  9827.  
  9828. Since the atmosphere is calculated by sampling  along  the  viewing  ray  and
  9829. looking for contributions from light sources, it is prone to  aliasing  (just
  9830. like any sampling technique). There  are  four  parameters  to  minimize  the
  9831. artifacts  that  may  be  visible:  "samples",  "jitter",  "aa_level",   and
  9832. "aa_threshold".
  9833.  
  9834. The "samples" keyword determines how  many  samples  are  calculated  in  one
  9835. interval along the viewing ray. The length of  the  interval  is  either  the
  9836. distance as given by the distance keyword or the length of the "lit" part  of
  9837. the viewing ray, whichever is smaller. This lit part is a section of the  ray
  9838. that is "most likely" lit by a light source. In the case of a spotlight it is
  9839. the part of the ray that lies in the cone of light. In other cases it becomes
  9840. more difficult. The only thing you should keep in mind  is  that  the  actual
  9841. sampling interval length is variable but there will never be fewer  than  the
  9842. specified samples in the specified distance.
  9843.  
  9844. One technique to reduce the visibility of sampling artifacts is to jitter the
  9845. sample points, i.e. to add random noise to their location. This can  be  done
  9846. with the "jitter" keyword.
  9847.  
  9848. Another technique is supersampling (an anti-aliasing method). This  helps  to
  9849. avoid missing features by adding  additional  samples  in  places  were  high
  9850. intensity changes occur (e.g. the edge of a  shadow).  The  anti-aliasing  is
  9851. turned  on  by  the  "aa_level"  keyword.  If  this  is  larger  than   zero
  9852. supersampling will be used. The additional samples will be recursively placed
  9853. between two samples  with  a  high  intensity  change.  The  level  to  which
  9854. subdivision takes places is specified by the "aa_level"  keyword.  Level  one
  9855. means  one  subdivision  (one  additional  sample),  level  two  means   two
  9856. subdivisions (up to three additional samples), etc.
  9857.  
  9858. The threshold for  the  intensity  change  is  given  by  the  "aa_threshold"
  9859. keyword. If the intensity change is greater than this threshold anti-aliasing
  9860. will be used for those two samples.
  9861.  
  9862. With spotlights you'll be able to create the best results because their  cone
  9863. of light will become visible. Pointlights can be used to create effects  like
  9864. street lights in fog. Fill-lights are not taken into account when calculating
  9865. atmospheric effects. They can be used to increase the overall light level off
  9866. the scene to make it look more realistic.
  9867.  
  9868. 3.7.2            Background
  9869.  
  9870. A background color can be specified if desired. Any ray that doesn't  hit  an
  9871. object will be colored with this color. The default background is black.  The
  9872. syntax for background is:
  9873.  
  9874.   background { colour <COLOUR> }
  9875.  
  9876.  
  9877. 3.7.3            Fog
  9878.  
  9879. Fog is defined by the following statement:
  9880.  
  9881.   fog {
  9882.     fog_type FOG_TYPE
  9883.     distance DISTANCE
  9884.     colour <COLOUR>
  9885.     [ turbulence <TURBULENCE> ]
  9886.     [ turb_depth TURB_DEPTH ]
  9887.     [ omega OMEGA ]
  9888.     [ lambda LAMBDA ]
  9889.     [ octaves OCTAVES ]
  9890.     [ fog_offset FOG_OFFSET ]
  9891.     [ fog_alt FOG_ALT ]
  9892.   }
  9893.  
  9894.  
  9895. Currently there are two fog types, constant fog and ground fog. Constant  fog
  9896. has a constant density everywhere  while  ground  fog  thins  out  along  the
  9897. y-axis. The location of the maximum density  is  given  by  the  "fog_offset"
  9898. keyword and the height of  the  fog  layer  is  specified  by  the  "fog_alt"
  9899. keyword. The ground fog fades to nothing along the y-axis from fog_offset  to
  9900. the distance fog_alt.
  9901.  
  9902. Two constants are defined  for  easy  use  of  the  fog  types  in  the  file
  9903. "const.inc":
  9904.  
  9905.    // FOG TYPE CONSTANTS
  9906.    #declare Constant_Fog = 1
  9907.    #declare Ground_Fog   = 2
  9908.  
  9909.  
  9910. The color of a pixel with an intersection depth d is calculated by
  9911.  
  9912.   C_pixel = exp(-d/D) * C_object + (1-exp(-d/D)) * C_fog
  9913.  
  9914.  
  9915. where D is the fog distance. At depth 0  the  final  color  is  the  object's
  9916. color. If the intersection depth equals the  fog  distance  the  final  color
  9917. consists of 64% of the object's color and 36% of the fog's color.
  9918.  
  9919. The fog color that is given by the "color" keyword has three purposes.  First
  9920. it defines the color to be used in  blending  the  fog  and  the  background.
  9921. Second  it  is  used  to  specify  a  translucency  threshold.  By  using  a
  9922. transmittance larger than zero one can make sure that at least that amount of
  9923. light will be seen through the fog. With a transmittance of 0.3 you'll see at
  9924. least 30% of the background. Third it can be used to make  a  filtering  fog.
  9925. With a filter value f larger than zero the amount of background  light  given
  9926. by f will be multiplied with the fog color. A filter value of 0.7  will  lead
  9927. to a fog that filters 70% of the background light and leaves 30%  unfiltered.
  9928.  
  9929.  
  9930. Fogs may be "layered". That is, you can apply as many layers of  fog  as  you
  9931. like. Generally this is most effective if each  layer  is  a  ground  fog  of
  9932. different color, altitude, and with different turbulence values.
  9933.  
  9934. To use multiple layers of fogs, just add all of them to the scene.
  9935.  
  9936. You may optionally stir up the  fog  by  adding  turbulence.  The  turbulence
  9937. keyword may be followed by  a  float  or  vector  to  specify  an  amount  of
  9938. turbulence to be used. The omega, lambda and  octaves  turbulence  parameters
  9939. may also  be  specified.  See  "turbulence"  for  details  on  all  of  these
  9940. turbulence parameters.
  9941.  
  9942. Additionally the fog turbulence may be scaled  along  the  direction  of  the
  9943. viewing ray using the turb_depth amount. Typical values are from 0.0  to  1.0
  9944. or more. The default value is 0.5 but and float value may be used.
  9945.  
  9946. 3.7.4            Sky Sphere
  9947.  
  9948. The sky sphere is used create a realistic sky background without the need  of
  9949. an additional sphere to simulate the sky. Its syntax is:
  9950.  
  9951.   skysphere {
  9952.     pigment { PIGMENT1 }
  9953.     pigment { PIGMENT2 }
  9954.     pigment { PIGMENT3 }
  9955.     ...
  9956.   }
  9957.  
  9958.  
  9959. The sky sphere can contain several pigment layers with the last pigment being
  9960. at the bottom, i.e. it is evaluated first, and the first pigment being at the
  9961. top, i.e. it is evaluated last. If  upper  layers  contain  filtering  and/or
  9962. transmitting components lower layers will be seen. If not lower  layers  will
  9963. be invisible.
  9964.  
  9965. The sky sphere is calculated by using the direction vector as  the  parameter
  9966. for evaluating the pigment patterns. This leads to results  independent  from
  9967. the view point which pretty good models a real sky where the distance to  the
  9968. sky is much larger than the distances between visible objects.
  9969.  
  9970. If you want to add a nice color blend to your background you  can  easily  do
  9971. this by using the following example.
  9972.  
  9973.   sky_sphere {
  9974.     pigment {
  9975.       gradient y
  9976.       color_map {
  9977.         [ 0.5  color CornflowerBlue ]
  9978.         [ 1.0  color MidnightBlue ]
  9979.       }
  9980.       scale 2
  9981.       translate <-1, -1, -1>
  9982.     }
  9983.   }
  9984.  
  9985.  
  9986. This gives a soft blend from CornflowerBlue at the horizon to MidnightBlue at
  9987. the zenith. The scale and translate operations are used to map the  direction
  9988. vector values, which lie in the range from <-1, -1, -1> to <1,  1,  1>,  onto
  9989. the range from <0, 0, 0> to <1, 1, 1>. Thus a repetition of the  color  blend
  9990. is avoided for parts of the sky below the horizon.
  9991.  
  9992. You should note that only one sky sphere can be used in any  scene.  It  also
  9993. won't work as you might expect if you use camera types like the  orthographic
  9994. or cylindrical camera. The orthographic camera uses parallel  rays  and  thus
  9995. you'll only see a very small part of the sky sphere  (you'll  get  one  color
  9996. skies in most cases). Reflections in curved surface will  work  though,  e.g.
  9997. you will clearly see the sky in a mirrored ball.
  9998.  
  9999. 3.7.5            Rainbow
  10000.  
  10001. The rainbow is a fog-like, circular arc that can be used to create  rainbows.
  10002. The syntax is:
  10003.  
  10004.   rainbow {
  10005.     direction <DIR>
  10006.     angle ANGLE
  10007.     width WIDTH
  10008.     distance DISTANCE
  10009.     color_map { COLOUR_MAP }
  10010.     [ jitter JITTER ]
  10011.     [ up <UP> ]
  10012.     [ arc_angle ARC_ANGLE ]
  10013.     [ falloff_angle FALLOFF_ANGLE ]
  10014.   }
  10015.  
  10016.  
  10017. The "direction" vector determines the direction of the (virtual)  light  that
  10018. is responsible for the rainbow. Ideally this is an infinitely far away  light
  10019. source like the sun that emits parallel light rays. The position and size  of
  10020. the rainbow are specified by the "angle" and "width" keywords. To  understand
  10021. how they work you should first know how the rainbow is calculated.
  10022.  
  10023. For each ray the angle between the rainbow's direction vector and  the  ray's
  10024. direction vector is calculated. If this  angle  lies  in  the  interval  from
  10025. ANGLE-WITH/2 to ANGLE+WIDTH/2 the rainbow is hit by the  ray.  The  color  is
  10026. then determined by using the angle as an index into the  rainbow's  colormap.
  10027. After the color has been determined it will  be  mixed  with  the  background
  10028. color in the same way like it is done for fogs.
  10029.  
  10030. Thus the angle and width parameters determine  the  angles  under  which  the
  10031. rainbow will be seen. The optional "jitter" keyword can be used to add random
  10032. noise to the index. This adds some irregularity to the rainbow that makes  it
  10033. look more realistic.
  10034.  
  10035. The "distance" keyword is the same like the one used  with  fogs.  Since  the
  10036. rainbow is a fog-like effect it's possible that the rainbow is noticeable  on
  10037. objects. If this effect is not wanted it can be  avoided  by  using  a  large
  10038. distance value. By default a sufficiently large value is used  to  make  sure
  10039. that this effect is avoided.
  10040.  
  10041. The "color_map" keyword is used to assign a color map  that  will  be  mapped
  10042. onto the rainbow. To be able to create realistic rainbows it is important  to
  10043. know that the index into the color map increases with the angle  between  the
  10044. ray's and rainbow's direction vector. The index  is  zero  at  the  innermost
  10045. "ring" and one at the outermost "ring". The filter and  transmittance  values
  10046. of the colors in the color map have the same meaning as the  ones  used  with
  10047. fogs.
  10048.  
  10049. The default rainbow is a 360 degree arc that looks like a circle. This is  no
  10050. problem as long as you have a ground plane that hides the lower,  non-visible
  10051. part of the rainbow. If this isn't the case or if you don't want the full arc
  10052. to be visible you  can  use  the  optional  keywords  "up",  "arc_angle"  and
  10053. "falloff_angle" to specify a smaller arc.
  10054.  
  10055. The "arc_angle" keyword determines the size of the arc in degrees (from 0  to
  10056. 360 degrees). Using a value smaller than 360 degrees gives you  an  arc  that
  10057. abruptly  vanishes.  Since  this  doesn't  look  nice  you   can   use   the
  10058. "falloff_angle" keyword to  specify  a  region  in  which  the  rainbow  will
  10059. smoothly blend into the background making it vanish softly. The falloff angle
  10060. has to be smaller or equal to the arc angle.
  10061.  
  10062. The "up" keyword determines were the "zero angle" position  is.  By  changing
  10063. this vector you can "rotate" the rainbow about its direction. You should note
  10064. that the arc goes from -ARC_ANGLE/2 to +ARC_ANGLE/2. The soft regions go from
  10065. -ARC_ANGLE/2 to -FALLOFF_ANGLE/2 and from +FALLOFF_ANGLE/2 to +ARC_ANGLE/2.
  10066.  
  10067. The following example generates a 120 degrees rainbow arc that has a  falloff
  10068. region of 30 degrees at both ends:
  10069.  
  10070.   rainbow {
  10071.     direction <0, 0, 1>
  10072.     angle 42.5
  10073.     width 5
  10074.     distance 1000
  10075.     jitter 0.01
  10076.     color_map { Rainbow_Color_Map }
  10077.     up <0, 1, 0>
  10078.     arc_angle 240
  10079.     falloff_angle 60
  10080.   }
  10081.  
  10082.  
  10083. It is possible to use any number of rainbows and to combine them  with  other
  10084. atmospheric effects.
  10085.  
  10086. 3.8              Miscellaneous Features
  10087.  
  10088.  
  10089. 3.8.1            Ambient Light
  10090.  
  10091. Ambient light is used to simulate the effect of interdiffuse reflection  that
  10092. is responsible for lighting areas that partially or completely lie in shadow.
  10093. POV-Ray provides an ambient  light  source  to  let  you  easily  change  the
  10094. brightness of the ambient lighting without changing every  ambient  value  in
  10095. all finish statements.  It  also  lets  you  create  interesting  effects  by
  10096. changing the color of the ambient light source.
  10097.  
  10098. The syntax is:
  10099.  
  10100.   ambient_light { COLOR }
  10101.  
  10102.  
  10103. 3.9              Global Settings
  10104.  
  10105. The  global_settings  statement  is  a  "catch-all"  statement  that  gathers
  10106. together a number of global parameters. The statement may appear anywhere  in
  10107. a scene as long as its not inside any other statement. You may have  multiple
  10108. global_settings statements in a scene. Whatever values were specified in  the
  10109. last global_settings statement override any previous settings. Regardless  of
  10110. where you specify the statement, the feature applies to the entire scene.
  10111.  
  10112. Note some items which were language directives in previous versions  of  POV-
  10113. Ray have been moved inside the global_settings statement so that it  is  more
  10114. obvious to the user that their effect is global. The old syntax is  permitted
  10115. but generates a warning.
  10116.  
  10117.   global_settings {
  10118.     adc_bailout FLOAT
  10119.     ambient_light COLOR
  10120.     assumed_gamma FLOAT
  10121.     hf_gray_16 BOOLEAN
  10122.     irid_wavelength COLOR
  10123.     max_intersections INTEGER
  10124.     max_trace_level INTEGER
  10125.     number_of_waves INTEGER
  10126.     radiosity { RADIOSITY_ITEMS... }
  10127.   }
  10128.  
  10129.  
  10130.  
  10131. Each item is optional and may appear in and order. If an  item  is  specified
  10132. more than once, the last setting overrides previous values. Details  on  each
  10133. item is given in the following sections.
  10134.  
  10135. 3.9.1            ADC_Bailout
  10136.  
  10137. In scenes with many reflective and  transparent  surfaces,  POV-Ray  can  get
  10138. bogged down tracing multiple reflections and refractions that contribute very
  10139. little to the color of a particular pixel. The program uses a  system  called
  10140. Adaptive Depth Control  (ADC)  to  stop  computing  additional  reflected  or
  10141. refracted rays when their contribution is insignificant.
  10142.  
  10143. You may use the global setting adc_bailout keyword followed by float value to
  10144. specify the point at which a ray's contribution is considered  insignificant.
  10145.  
  10146.  
  10147.   global_setting { adc_bailout FLOAT }
  10148.  
  10149.  
  10150. The default value is 1/255, or approximately 0.0039, since a  change  smaller
  10151. than that could not be visible in a 24 bit image. Generally this  setting  is
  10152. perfectly adequate, and should be left alone. Setting adc_bailout to  0  will
  10153. disable ADC, relying completely on max_trace_level to set an upper  limit  on
  10154. the number of rays spawned.
  10155.  
  10156.  
  10157. 3.9.2            Ambient Light
  10158.  
  10159. Ambient light is used to simulate the effect of interdiffuse reflection  that
  10160. is responsible for lighting areas that partially or completely lie in shadow.
  10161. POV-Ray provides an ambient  light  source  to  let  you  easily  change  the
  10162. brightness of the ambient lighting without changing every  ambient  value  in
  10163. all finish statements.  It  also  lets  you  create  interesting  effects  by
  10164. changing the color of the ambient light source.
  10165.  
  10166. The syntax is:
  10167.  
  10168.   global_setting { ambient_light COLOR }
  10169.  
  10170.  
  10171. The default is a white ambient light source set  at  rgb<1,1,1>.  The  actual
  10172. ambient used is:
  10173.  
  10174.    AMBIENT = FINISH_AMBIENT * GLOBAL_AMBIENT
  10175.  
  10176.  
  10177. 3.9.3            Assumed_Gamma
  10178.  
  10179. Many people may have noticed at one time or another that some images are  too
  10180. bright or dim when displayed on their system. As a rule, Macintosh users find
  10181. that images created on a PC are too bright, while PC users find  that  images
  10182. created on a Macintosh are too dim.
  10183.  
  10184. The assumed_gamma global setting works in conjunction with the  Display_Gamma
  10185. INI setting (see section "Display Hardware Settings" ) to ensure  that  scene
  10186. files render the same way across the wide variety of hardware platforms  that
  10187. POV-Ray is used on. The assumed_gamma setting is used  in  a  scene  file  as
  10188. follows:
  10189.  
  10190.   global_setting { assumed_gamma FLOAT }
  10191.  
  10192.  
  10193. where the assumed_gamma is the correction factor to  be  applied  before  the
  10194. pixels are displayed and/or saved  to  disk.  For  scenes  created  in  older
  10195. versions of POV-Ray, the assumed_gamma will be the same as the  Display_Gamma
  10196. of the system the scene was created on.  For  PC  systems,  the  most  common
  10197. Display_Gamma is 2.2, while for scenes created on  Macintosh  systems  should
  10198. use a scene gamma of 1.8. Another gamma value that sometimes occurs in scenes
  10199. is 1.0.
  10200.  
  10201. Scenes that do not have an assumed_gamma global setting  will  not  have  any
  10202. gamma correction performed on them, for compatibility  reasons.  If  you  are
  10203. creating new scenes or rendering old scenes, it is strongly recommended  that
  10204. you put in an appropriate assumed_gamma global setting. For new  scenes,  you
  10205. should use an assumed_gamma value of 1.0 as this models how light appears  in
  10206. the real world more realistically.
  10207.  
  10208. The following sections explain more thoroughly what gamma is and  why  it  is
  10209. important.
  10210.  
  10211. 3.9.3.1          Monitor Gamma
  10212.  
  10213. The differences in how images are displayed is a result  of  how  a  computer
  10214. actually takes an image and displays it on the monitor.  In  the  process  of
  10215. rendering an image and displaying it on the screen, several gamma values  are
  10216. important, including the POV scene file or image file gamma, and the  monitor
  10217. gamma.
  10218.  
  10219. Most image files generated by POV-Ray store numbers in the range 0 to 255 for
  10220. each of the red, green,  and  blue  components  of  a  pixel.  These  numbers
  10221. represent the intensity of each color component, with 0 being black, and  255
  10222. being the brightest color (either 100% red, 100% green, or 100%  blue).  When
  10223. an image is displayed, the graphics card converts each color component into a
  10224. voltage which is sent to the monitor to light up the  red,  green,  and  blue
  10225. phosphors on the screen. The voltage is usually proportional to the value  of
  10226. each color component.
  10227.  
  10228. Gamma becomes important when displaying intensities that aren't  the  maximum
  10229. or minimum possible values. For example, 127  should  represent  50%  of  the
  10230. maximum intensity for pixels stored as numbers between 0 and 255. On  systems
  10231. that don't do gamma correction, 127 will be converted to 50% of  the  maximum
  10232. voltage, but because of the way the phosphors and  the  electron  guns  in  a
  10233. monitor work, this may be only 22%  of  the  maximum  color  intensity  on  a
  10234. monitor with a gamma of 2.2. To display a pixel which is 50% of  the  maximum
  10235. intensity on this monitor, we would need a voltage  of  73%  of  the  maximum
  10236. voltage, which translates to storing a pixel value of 186.
  10237.  
  10238. The relationship between the input pixel value and  the  displayed  intensity
  10239. can be approximated by an exponential function (^ means exponentiation):
  10240.  
  10241.   obright = ibright ^ display_gamma
  10242.  
  10243.  
  10244. where obright is the  output  intensity,  and  ibright  is  the  input  pixel
  10245. intensity. Both values are in the range 0 to 1 (0% to  100%).  Most  monitors
  10246. have a fixed gamma value in the range 1.8 to 2.6.  Using  the  above  formula
  10247. with display_gamma values greater than 1.0 means the output  brightness  will
  10248. be less than the input brightness. In order to  have  the  output  and  input
  10249. brightness be equal, an overall system gamma of 1.0 is needed. To do this, we
  10250. need to gamma correct the input brightness in the same manner as  above,  but
  10251. with a gamma value of 1.0/ display_gamma before it is sent to the monitor. To
  10252. correct for a display gamma of 2.2, this pre-monitor gamma correction uses  a
  10253. gamma value of 1.0/2.2, or approximately 0.45.
  10254.  
  10255. How the pre-monitor gamma correction is done depends  on  what  hardware  and
  10256. software is being used. On Macintosh systems, the operating system has  taken
  10257. it upon itself to insulate  applications  from  the  differences  in  display
  10258. hardware. Through a gamma control panel, the user may  be  able  to  set  the
  10259. actual monitor gamma, and MacOS will then convert all  pixel  intensities  so
  10260. that the monitor will appear to have the specified gamma  value.  On  Silicon
  10261. Graphics  machines,  the  display  adapter  has  built-in  gamma  correction
  10262. calibrated to the monitor which gives the desired overall gamma (the  default
  10263. is 1.7). Unfortunately, on PCs and  most  UNIX  systems,  it  is  up  to  the
  10264. application to do any gamma correction needed.
  10265.  
  10266. 3.9.3.2          Image File Gamma
  10267.  
  10268. Since most PC and UNIX applications and image file formats  don't  understand
  10269. display gamma, they don't do anything to correct for it. As a  result,  users
  10270. creating images on these systems adjust the image in such a way that  it  has
  10271. the correct brightness when displayed. This means that the data values stored
  10272. in the files are made brighter to compensate for the darkening effect of  the
  10273. monitor. In essence, the 0.45 gamma correction is built in to the image files
  10274. created and stored on these systems. When these  files  are  displayed  on  a
  10275. Macintosh system, the gamma correction built in to the file, in  addition  to
  10276. gamma correction built into MacOS means that the image will  be  too  bright.
  10277. Similarly, files that look correct on Macintosh or SGI systems because of the
  10278. built-in gamma correction will be too dark when displayed on a PC.
  10279.  
  10280. The new PNG format files generated by POV 3.0 overcome  the  problem  of  too
  10281. much or not enough gamma correction by storing the image file gamma (which is
  10282. 1.0/ Display_Gamma) inside the PNG file when it is generated by POV-Ray. When
  10283. the PNG file is later displayed by a program that has been set up  correctly,
  10284. it uses this gamma value as well as the current display gamma to correct  for
  10285. the potentially different display gamma used  when  originally  creating  the
  10286. image.
  10287.  
  10288. Unfortunately, of all the image file formats POV supports, PNG  is  the  only
  10289. one that has any gamma correction features and  is  therefore  preferred  for
  10290. images that will be displayed on a wide variety of platforms.
  10291.  
  10292. 3.9.3.3          Scene File Gamma
  10293.  
  10294. The image file gamma problem itself is just a result of how scenes themselves
  10295. are generated in POV-Ray. When you start out with a new scene and are placing
  10296. light sources, and adjusting surface textures and colors, you generally  make
  10297. several attempts before the lighting is how you like it. How you choose these
  10298. settings depends upon the preview image, or the image file  stored  to  disk,
  10299. which in turn is dependent upon the overall gamma  of  the  display  hardware
  10300. being used.
  10301.  
  10302. This means that as the artist, you are doing gamma correction in the  POV-Ray
  10303. scene file for your particular hardware. This scene  file  will  generate  an
  10304. image file that is also gamma corrected for your hardware, and  will  display
  10305. correctly on systems similar  to  your  own.  However,  when  this  scene  is
  10306. rendered on another platform, it may be too bright or too dim, regardless  of
  10307. the output file format used. Rather than have you change all the scene  files
  10308. to have a single fixed gamma value (heaven forbid!), POV-Ray 3.0  allows  you
  10309. to specify in the scene file the Display_Gamma of the system that  the  scene
  10310. was created on.
  10311.  
  10312. The assumed_gamma global setting, in conjunction with the  Display_Gamma  INI
  10313. setting lets POV-Ray know how to do gamma correction on a given scene so that
  10314. the preview and output image files will appear the correct brightness on  any
  10315. system. Since the gamma correction is done internally  to  POV-Ray,  it  will
  10316. produce output image files that are the correct brightness  for  the  current
  10317. display, regardless of what output format is used. As well, since  the  gamma
  10318. correction is performed in the high-precision data format  the  POV-Ray  uses
  10319. internally, it produces better results than gamma correction done  after  the
  10320. file is written to disk.
  10321.  
  10322. Although you may not notice any difference in the output on your system  with
  10323. and without an assumed_gamma setting, the {HIW/}assumed_gamma is important if
  10324. the scene is ever rendered on another platform.
  10325.  
  10326. 3.9.4            HF_Gray_16
  10327.  
  10328. The hf_gray_16 setting is useful when using POV-Ray to generate  heightfields
  10329. for use in other POV-Ray scenes. The syntax is...
  10330.  
  10331.   global_setting { hf_gray_16 BOOLEAN }
  10332.  
  10333.  
  10334. The boolean values turns the option on or off. If the  keyword  is  specified
  10335. without the boolean value then the option is turned on. If hf_gray_16 is  not
  10336. specified in any global_settings statement  in  the  entire  scene  then  the
  10337. default is off.
  10338.  
  10339. When hf_gray_16 is on, the output file will be in the form of a  heightfield,
  10340. with the height at any point being dependent on the brightness of the  pixel.
  10341. The brightness of a pixel is calculated in the same way that color images are
  10342. converted to grayscale images, as follows:
  10343.  
  10344.   height = 0.3 * red + 0.59 * green + 0.11 * blue
  10345.  
  10346.  
  10347. Setting the hf_gray_16 option will cause the preview display, if used, to  be
  10348. in a grayscale rather than color. This  is  to  allow  you  to  see  how  the
  10349. heightfield will look, because some file formats store heightfields in a  way
  10350. that is difficult to understand afterwards. See section "Height Field" for  a
  10351. description of how POV-Ray heightfields are stored for each file type.
  10352.  
  10353. 3.9.5            Irid_Wavelength
  10354.  
  10355. Iridescence calculations depend upon the dominant wavelengths of the  primary
  10356. colors of red, green and blue light. You may  adjust  the  values  using  the
  10357. global setting irid_wavelength as follows...
  10358.  
  10359.   global_settings { irid_wavelength COLOR }
  10360.  
  10361.  
  10362. The default value is rgb<0.25,0.18,0.14> and any filter  or  transmit  values
  10363. are ignored. These values are proportional to the  wavelength  of  light  but
  10364. they represent no real world units.
  10365.  
  10366. In general, the default values should prove adequate,  but  we  provide  this
  10367. option as a means to experiment with other values.
  10368.  
  10369. 3.9.6            Max_Trace_Level
  10370.  
  10371. In scenes with many reflective and  transparent  surfaces,  POV-Ray  can  get
  10372. bogged down tracing multiple reflections and refractions that contribute very
  10373. little to the color of a particular pixel. The global setting max_trace_level
  10374. defines the maximum number of recursive levels that POV-Ray will trace a ray.
  10375.  
  10376.  
  10377.   global_settings { max_trace_level INTEGER }
  10378.  
  10379.  
  10380. This is used when a ray is reflected or  is  passing  through  a  transparent
  10381. object and when shadow rays are cast. When a ray hits a  reflective  surface,
  10382. it spawns another ray to see what that point reflects, that's trace level  1.
  10383. If it hits another reflective surface, then another ray  is  spawned  and  it
  10384. goes to trace level 2. The maximum level by default is 5.
  10385.  
  10386. One speed enhancement added to POV-Ray in  version  3.0  was  Adaptive  Depth
  10387. Control , or ADC. Each time a new ray is spawned as a result of reflection or
  10388. refraction, its contribution to the overall color of the pixel is reduced  by
  10389. the amount of reflection or the filter value of the  refractive  surface.  At
  10390. some point, this contribution can be  considered  to  be  insignificant,  and
  10391. there is no point in tracing any more rays. Adaptive depth  control  is  what
  10392. tracks this contribution and makes the decision  of  when  to  bail  out.  On
  10393. scenes that use a lot of partially reflective or  refractive  surfaces,  this
  10394. can result in a considerable reduction in the number of rays fired and  makes
  10395. it "safer" to use much higher max_trace_level values.
  10396.  
  10397. This reduction in color contribution is a result of scaling by the reflection
  10398. amount and/or the filter values of each  surface,  so  a  perfect  mirror  or
  10399. perfectly clear surface will not be optimizable  by  ADC.  You  can  see  the
  10400. results of ADC by  watching  the  "Rays  Saved"  and  "Highest  Trace  Level"
  10401. displays on the statistics screen.
  10402.  
  10403. The point at which  a  ray's  contribution  is  considered  insignificant  is
  10404. controlled by the adc_bailout value. The default  adc_bailout  is  1/255,  or
  10405. approximately 0.0039, since a change smaller than that could not  be  visible
  10406. in a 24 bit image. Generally this setting is perfectly adequate,  and  should
  10407. be left alone. Setting adc_bailout to 0 will disable ADC, relying  completely
  10408. on max_trace_level to set an upper limit on the number of rays spawned.
  10409.  
  10410. If max trace level is reached before a non-reflecting surface is  found,  and
  10411. if ADC hasn't allowed an early exit from the ray  tree,  then  the  color  is
  10412. returned as black. Raise max_trace_level if you see  black  in  a  reflective
  10413. surface where there should be a color.
  10414.  
  10415. The other symptom you could see is with transparent  objects.  For  instance,
  10416. try making a union of concentric spheres with a clear texture on  them.  Make
  10417. ten of them in the union with radius's from 1-10 then render the  Scene.  The
  10418. image will show the first few spheres correctly, then black. This is  because
  10419. a new level is used every time you pass through a transparent surface.  Raise
  10420. max_trace_level to fix this problem. For example:
  10421.  
  10422. Note: Raising max_trace_level will use more memory  and  time  and  it  could
  10423. cause the program to crash with a stack overflow  error,  although  ADC  will
  10424. alleviate this  to  a  large  extent.  Values  for  max_trace_level  are  not
  10425. restricted, so it can be set to any number as long as you have the  time  and
  10426. memory. However, increasing  its  setting  does  not  necessarily  equate  to
  10427. increased image quality unless such depths are really needed by the scene.
  10428.  
  10429. 3.9.7            Max_Intersections
  10430.  
  10431. POV-Ray uses a set of internal  stacks  to  collect  ray/object  intersection
  10432. points. The usual maximum number  of  entries  in  these  "I-Stacks"  is  64.
  10433. Complex scenes may cause these stacks to overflow. POV-Ray doesn't  stop  but
  10434. it may incorrectly render your scene.  When  POV-Ray  finishes  rendering,  a
  10435. number of statistics are displayed. If you see "I-Stack  Overflows"  reported
  10436. in the statistics, you should increase the stack size. Add a  global  setting
  10437. to your scene as follows:
  10438.  
  10439.   global_settings { max_intersections INTEGER }
  10440.  
  10441.  
  10442. 3.9.8            Number_Of_Waves
  10443.  
  10444. The wave and ripples pattern are generated by summing a series of waves, each
  10445. with a slightly different center and size. By default, ten waves are  summed,
  10446. but this amount can be globally controlled by  changing  the  number_of_waves
  10447. setting.
  10448.  
  10449.   global_settings { number_of_waves INTEGER }
  10450.  
  10451.  
  10452. Changing this value affects both waves and ripples alike on all  patterns  in
  10453. the scene.
  10454.  
  10455. 3.9.9            Radiosity
  10456.  
  10457. Radiosity is an  extra  calculation  that  more  realistically  computes  the
  10458. diffuse interreflection of light. This diffuse reflection can be seen if  you
  10459. place a white chair in a room full of  blue  carpet,  blue  walls,  and  blue
  10460. curtains, the chair will pick up a blue tint from  light  reflecting  off  of
  10461. other parts of the  room.  Also  notice  that  the  shadowed  areas  of  your
  10462. surroundings are not totally dark even if no light source shines directly  on
  10463. the surface. Diffuse light reflecting off  of  other  objects  fills  in  the
  10464. shadows. Typically ray  tracing  uses  a  trick  called  "ambient"  light  to
  10465. simulate such effects but it is not very accurate.
  10466.  
  10467. Radiosity is more accurate than simplistic ambient light but  it  takes  much
  10468. longer to compute. For  this  reason,  POV-Ray  does  not  use  radiosity  by
  10469. default. Radiosity is turned on using Quality=10 or Quality=11 options in  an
  10470. INI file or +q10 or +q11 command line switch. The default quality  is  9  and
  10471. uses no radiosity. A value of 10 uses radiosity but does not  compute  halos.
  10472. Quality 11 uses radiosity and halos. See "Quality Settings" for details.
  10473.  
  10474. The following sections describes how radiosity works, how to control it  with
  10475. various global settings and tips on trading quality vs. speed.
  10476.  
  10477. 3.9.9.1          How Radiosity Works
  10478.  
  10479. The problem of ray tracing is to figure out what the light level is  at  each
  10480. point that you can see in a scene. Traditionally, in  ray  tracing,  this  is
  10481. broken into the sum of these components:
  10482.  
  10483.   - Diffuse, the effect that makes  the  side  of  things  facing  the  light
  10484.     brighter;
  10485.   - Specular, the effect that makes shiny things have dings  or  sparkles  on
  10486.     them;
  10487.   - Reflection, the effect that mirrors give; and
  10488.   - Ambient, the general all-over light level that any scene has, which keeps
  10489.     things in shadow from being pure black.
  10490.  
  10491.  
  10492. POV's radiosity system, based on a method by Greg Ward,  provides  a  way  to
  10493. replace the last term - the constant ambient light value - with a light level
  10494. which is based on what surfaces are nearby, and how bright in turn they  are.
  10495.  
  10496.  
  10497. The first thing you  might  notice  about  this  definition  is  that  it  is
  10498. circular: the light of everything is dependent on everything else,  and  vice
  10499. versa. This is true in real life, but in the world of  ray  tracing,  we  can
  10500. make an approximation. The approximation that is used is: the objects you are
  10501. looking at have their 'ambient' values calculated for you,  by  checking  the
  10502. other objects nearby. When those objects are  checked  during  this  process,
  10503. however, a traditional constant ambient term is used.
  10504.  
  10505. How does POV calculate the ambient term for each point? By sending  out  more
  10506. rays, in many different directions, and  averaging  the  results.  A  typical
  10507. point might use 200 or  more  rays  to  calculate  its  ambient  light  level
  10508. correctly.
  10509.  
  10510. Now, this sounds like it would make the ray tracer 200 times slower. This  is
  10511. true, except that the software takes advantage of the fact that ambient light
  10512. levels change quite slowly. (Remember, shadows are calculated separately,  so
  10513. sharp shadow edges are not a problem). Therefore, these extra rays  are  sent
  10514. out only "once in a while" (about 1 time in 50), then these calculated values
  10515. are saved and reused for nearby pixels in the image when possible.
  10516.  
  10517. This process of saving and reusing values is  what  causes  the  need  for  a
  10518. variety of tuning parameters, so you can get the scene to look just  the  way
  10519. you want.
  10520.  
  10521. 3.9.9.2          Adjusting Radiosity
  10522.  
  10523. As described earlier, radiosity is turned on by using a quality level  of  10
  10524. or 11, however  radiosity  has  many  parameters  that  are  specified  in  a
  10525. radiosity  {...}  statement  inside  a  global_settings  {...}  statement  as
  10526. follows:
  10527.  
  10528.    global_settings {
  10529.      radiosity {
  10530.        brightness FLOAT
  10531.        count INTEGER
  10532.        distance_maximum FLOAT
  10533.        error_bound FLOAT
  10534.        gray_threshold FLOAT
  10535.        low_error_factor FLOAT
  10536.        minimum_reuse FLOAT
  10537.        nearest_count INTEGER
  10538.        recursion_limit INTEGER
  10539.      }
  10540.    }
  10541.  
  10542.  
  10543. Each item is optional and may appear in and order. If an  item  is  specified
  10544. more than once, the last setting overrides previous values. Details  on  each
  10545. item is given in the following sections.
  10546.  
  10547. 3.9.9.2.1        brightness
  10548.  
  10549. This is the degree to  which  ambient  values  are  brightened  before  being
  10550. returned upwards to the rest of the system. If an object is red  <1,  0,  0>,
  10551. with an ambient value of 0.3, then in normal situations a  red  component  of
  10552. 0.3 will be added in. With radiosity on,  assume  it  was  surrounded  by  an
  10553. object of color grey60 <0.6, 0.6, 0.6>. The average  color  returned  by  the
  10554. gathering process will be the same. This will be multiplied by the  texture's
  10555. ambient weight value of 0.3, returning  <0.18,  0.18,  0.18>.  This  is  much
  10556. darker than the 0.3 which would be added in normally. Therefore, all returned
  10557. values are brightened by the inverse of the average of the calculated values,
  10558. so the average ambient added in does not change. Some  will  be  higher  than
  10559. specified (higher than 0.3 in this example), and some will be lower, but  the
  10560. overall scene brightness will be unchanged.
  10561.  
  10562.  
  10563. 3.9.9.2.2        count
  10564.  
  10565. The number of rays that are sent out whenever a new radiosity value has to be
  10566. calculated. Values of 100-150 make most scenes look good. Higher values might
  10567. be needed for scenes with  high  contrast  between  light  levels,  or  small
  10568. patches of light causing the illumination. This would  be  used  only  for  a
  10569. final rendering on an image, since it is very compute intensive.  Since  most
  10570. scenes calculate the ambient value  at  1%  to  2%  of  pixels,  as  a  rough
  10571. estimate, your rendering will take 1% to 2% of this number times as long.  If
  10572. you set it to 300, your rendering might take 3 to 6 times as long to complete
  10573. (1% to 2% times 300).
  10574.  
  10575. When this value is too low, the light level will tend to look  a  little  bit
  10576. blotchy, as if the surfaces you're looking at were slightly warped.  If  this
  10577. is not important to your scene (as in the case that you have a bump  map,  or
  10578. if you have a strong texture), then by all means use a lower number.
  10579.  
  10580.  
  10581. 3.9.9.2.3        distance_maximum
  10582.  
  10583. This is the only tuning value that depends upon the size of  the  objects  in
  10584. the scene. This one must be set for scenes to render properly... the rest can
  10585. be ignored for a first try. It is difficult to describe the  meaning  simply,
  10586. but it sets the distance in model units from a sample at which the  error  is
  10587. guaranteed to hit 100% (Radiosity_Error_Bound >= 1): no samples are reused at
  10588. a distance larger than this from their original calculation point.
  10589.  
  10590. So, imagine an apple at the left edge of a table. The goal is  to  make  sure
  10591. that samples on the surface of the table at the right are not used too  close
  10592. to the apple, and definitely not underneath the  apple.  If  you  had  enough
  10593. rays, there wouldn't be a problem, since one of them would be  guaranteed  to
  10594. hit the apple and set the reuse radius properly for  you.  In  practice,  you
  10595. must limit this.
  10596.  
  10597. I use this technique: which object in your scene might have this problem:  (a
  10598. small object on a larger flatter surface, that you want  good  ambient  light
  10599. near). Now, how far from this would you have to get to be sure  that  one  of
  10600. your rays had a good chance of hitting it? In the apple-on-the-table example,
  10601. assuming I used one POV-Ray unit as one  inch,  I  might  use  30  inches.  A
  10602. theoretically sound way (when you are running lots of rays) is  the  distance
  10603. at which this object's top is 5 degrees above the horizon of the sample point
  10604. you are considering. This corresponds to about 11 times  the  height  of  the
  10605. object. So, for a 3-inch apple, 33 inches makes some sense. For good behavior
  10606. under and around a 1/3 inch  pea,  use  3  inches  etc.  Another  VERY  rough
  10607. estimate is one third the distance from your eye position to  the  point  you
  10608. are looking at. The reasoning is that you are probably no more than 90 inches
  10609. from the apple on the table, if you care about the shading underneath it.
  10610.  
  10611.  
  10612. 3.9.9.2.4        error_bound
  10613.  
  10614. This is one of the two main speed/quality tuning  values  (the  other  is  of
  10615. course the number of rays shot). In an ideal world, this would  be  the  only
  10616. {END/} value needed. It is intended to mean the fraction of error  tolerated.
  10617. For example, if it were set to 1, then the algorithm would  not  calculate  a
  10618. new value until the error on the last one was estimated at as high  as  100%.
  10619. Ignoring the error introduced by rotation for the moment,  on  flat  surfaces
  10620. this is equal to the fraction of the reuse distance, which  in  turn  is  the
  10621. distance to the closest item hit. So, if you have an old sample on the  floor
  10622. 10 inches from a wall, an error bound of .5 will get you a new  sample  at  a
  10623. distance of about 5 inches from the wall. .5 is a little rough and ready, .33
  10624. is good for final renderings. Values much lower than .3 take forever.
  10625.  
  10626. The default value is 0.4.
  10627.  
  10628.  
  10629. 3.9.9.2.5        gray_threshold
  10630.  
  10631. Diffusely interreflected light is a function of the objects around the  point
  10632. in question. Since this is recursively  defined  to  millions  of  levels  of
  10633. recursion, in any real life scene, every point is  illuminated  at  least  in
  10634. part by every other part of the scene. Since we can't afford to compute this,
  10635. we only do one bounce, and so the calculated ambient light is  very  strongly
  10636. affected by the colors of the objects near it. This is known as color  bleed,
  10637. and it really happens, but not as much as this calculation method would  have
  10638. you believe. So, this variable grays it down a little,  to  make  your  scene
  10639. more believable. A value of .6 means to calculate the ambient value as 60% of
  10640. the  equivalent  grey  value  calculated,  plus  40%  of  the  actual  value
  10641. calculated. At 0%, this  feature  does  nothing.  At  100%,  you  always  get
  10642. white/grey ambient light, with no hue. Note that this  does  not  change  the
  10643. lightness/darkness, only the strength of  hue/grayness.  (In  HLS  terms,  it
  10644. changes H only).
  10645.  
  10646.  
  10647. 3.9.9.2.6        low_error_factor
  10648.  
  10649. If you calculate just enough samples, but no more,  you  will  get  an  image
  10650. which has slightly blotchy lighting. What  you  want  is  just  a  few  extra
  10651. interspersed, so that the blending will be nice and smooth. The  solution  to
  10652. this is the mosaic preview:  it  goes  over  the  image  one  or  more  times
  10653. beforehand, calculating radiosity values. To ensure that you get a few extra,
  10654. the radiosity algorithm lowers the error bound during the  pre-final  passes,
  10655. the sets it back just before the final  pass.  This  tuning  value  sets  the
  10656. amount that the error bound is dropped during the preliminary  image  passes.
  10657. So, if your low error factor is .8, and your error bound is set to  .4,  then
  10658. it will really use an error bound of .32 during the first passes  and  .4  on
  10659. the final pass.
  10660.  
  10661.  
  10662. 3.9.9.2.7        minimum_reuse
  10663.  
  10664. The minimum effective radius ratio. This is the fraction of the screen  width
  10665. which sets the minimum radius of reuse for each sample point.  (Actually,  it
  10666. is the fraction of the distance from the eye, but the two are roughly equal).
  10667. For example, if the value is .02, then the radius of maximum reuse for  every
  10668. sample is set to whatever ground distance corresponds to 2% of the  width  of
  10669. the screen. Imagine you sent a ray off to the horizon, and it hit the  ground
  10670. at a distance of 100 miles from your eyepoint. The reuse  distance  for  that
  10671. sample will be set to 2 miles. At a  resolution  of  300  x  400,  this  will
  10672. correspond to (very roughly) 8 pixels. The theory is that you don't  want  to
  10673. calculate values for every pixel into every crevice everywhere in the  scene,
  10674. it will take too long. This sets a minimum bound for the reuse. If this value
  10675. is too low, (which is should be in theory) rendering gets  slow,  and  inside
  10676. corners can get a little grainy. If it is set too high,  you  don't  get  the
  10677. natural darkening of illumination near inside  edges,  since  it  reuses.  At
  10678. values higher than 2% you start getting more just plain errors, like  reusing
  10679. the illumination of the open table underneath the apple.
  10680.  
  10681. Remember! This is a unitless ratio.
  10682.  
  10683.  
  10684. 3.9.9.2.8        nearest_count
  10685.  
  10686. This is the maximum number of old ambient values blended together to create a
  10687. new interpolated value.  It  will  always  be  the  N  geometrically  closest
  10688. reusable points that get used. If you go lower than 4, things can get  pretty
  10689. patchy. This can be good for debugging, though. Must  be  no  more  than  10,
  10690. since that is the size of the array allocated.
  10691.  
  10692.  
  10693. 3.9.9.2.9        radiosity_quality
  10694.  
  10695.  
  10696. 3.9.9.2.10       recursion_limit
  10697.  
  10698. This value determines how many recursion levels are  used  to  calculate  the
  10699. diffuse inter-reflection. Valid values are one and two.
  10700.  
  10701.  
  10702. 3.9.9.3          Tips on Radiosity
  10703.  
  10704. If you  want  to  see  where  your  values  are  being  calculated,  set  the
  10705. Radiosity_Count down to about 20, set the Radiosity_Nearest_Count to  1,  and
  10706. set the Radiosity_Grey to 0. This will make everything maximally  patchy,  so
  10707. you'll be able to see the borders between patches. There  will  have  been  a
  10708. radiosity calculation at the center of most patches.  As  a  bonus,  this  is
  10709. quick to run. You can then change the Radiosity_Error_Bound up and down,  and
  10710. see how it changes things. Likewise the Radiosity_Reuse_Dist_Min and Max.
  10711.  
  10712. One way to get extra smooth results: crank up the sample count (I've done  as
  10713. high as 1300) , and drop the low_error_factor to  something  small  like  .6.
  10714. Bump up the reuse_count to 7 or 8. This will get better values, and  more  of
  10715. them, then interpolate among more of them on the last pass. This is  not  for
  10716. people with a lack of patience, since it is like a squared function. If  your
  10717. blotchiness is only in certain corners or near certain  objects,  try  tuning
  10718. the error bound instead. Never drop it by more than a little at a time, since
  10719. the run time will get very long.
  10720.  
  10721. If your scene looks good, but right near some objects you get  spots  of  the
  10722. right (usually darker) color showing on a flat surface  of  the  wrong  color
  10723. (same as far away from the object), then try dropping the reuse_dist_max.  If
  10724. that still doesn't work well, then increase your ray count by  100  and  drop
  10725. the  error  bound  just  a  bit.  If  you  still  have  problems,  drop  the
  10726. reuse_nearest_count to about 4.
  10727.  
  10728. APPENDIX A       POV-Ray Output Messages
  10729.  
  10730.  
  10731. APPENDIX A.1     Options in Use
  10732.  
  10733.  
  10734. APPENDIX A.2     Warning Messages
  10735.  
  10736.  
  10737. APPENDIX A.2.1   Warnings during the Parsing Stage
  10738.  
  10739.  
  10740. APPENDIX A.2.2   Other Warnings
  10741.  
  10742.  
  10743. APPENDIX A.3     Error Messages
  10744.  
  10745.  
  10746. APPENDIX A.3.1   Scene File Errors
  10747.  
  10748.  
  10749. APPENDIX A.3.2   Other Errors
  10750.  
  10751.  
  10752. APPENDIX A.4     Statistics
  10753.  
  10754.  
  10755. APPENDIX B       Help on Help
  10756.  
  10757. Using the Help Reader (POVHELP.EXE)
  10758.  
  10759. KNOWN INCOMPATIBILITIES
  10760.  
  10761. See after the Quick Intro.
  10762.  
  10763. Quick Intro
  10764.  
  10765. Use the +E option to make the help reader a pop-up program.
  10766. Use Space to go to the next section.
  10767. Use Ctrl-PgUp and Ctrl-PgDn to move between sections also.
  10768. Use Tab to highlight hypertext links.
  10769. Use Alt-Tab to highlight code fragments.
  10770. Use Enter to jump to a highlighted hypertext link.
  10771. Use +/- to jump to relevant sections once link jumping has started.
  10772. Use BACKSPACE to return to the last place you were before a search/jump.
  10773. Use 'S' to search on a keyword.
  10774. Use 'J' to toggle text justification when reading a section.
  10775. Use 'P' to paste code into your application via the keyboard buffer.
  10776.  
  10777. POV-Help will handle non-standard page widths provided the BIOS column  count
  10778. is correctly updated by whatever program is being used to alter  it  from  80
  10779. columns.
  10780.  
  10781. If you use POV-Help as a pop-up program, it will attempt  to  search  on  the
  10782. word under your cursor when you pop it up. Note that if you exit pop-up  mode
  10783. by using the hot-key, POV-Help takes this to mean that you want to return  to
  10784. the same place next time and will not perform a  search.  A  search  is  only
  10785. performed if you exited using ESCAPE (meaning  you  have  finished  with  the
  10786. current subject.)
  10787.  
  10788. The history stack activated by using Backspace holds 32 entries.
  10789.  
  10790. KNOWN INCOMPATIBILITIES
  10791.  
  10792. POV-Help does not work with MS-DOS's EDIT  program.  [In  fact,  EDIT.COM  is
  10793. really QBASIC.EXE with a few add ons ; EDIT needs QBASIC to run.]
  10794.  
  10795. If it won't work  with  your  editor,  try  this  (assuming  you  have  macro
  10796. facilities) -
  10797.  
  10798.   o write a macro to get the word under the cursor
  10799.   o have it call POVHELP.EXE with the word as a parameter
  10800.   o bind the macro to your key-sequence of choice.
  10801.  
  10802.  
  10803. Co+Iname ine (case insensuse alternate file name (default HELP.PHE)
  10804.   +N123                  go to the 123rd section (NOT section 123!)
  10805.   +S4.5.6                go to section '4.5.6'
  10806.   +Tsphere or "+Tsphere" go straight to the first section found with 'sphere'
  10807.                          in its title.
  10808.   +W50                   window width 40 characters (max 127)
  10809.   +H15                   window height 15 lines (max 21)
  10810.   +J[-]                  justify ON (default), -J- to turn off
  10811.   +PH[n]                 send 'n' HOME  keys  after  each  CR  when  pasting.
  10812.                          default is -ph1.
  10813.   +KALT-ESC              hot  key  sequence.  can  be  CTRL|ALT|CTRL-ALT+[Any
  10814.                           character]|[ESC].  e.g.   +KCTRL-ALT-P,   +KCTRL-1,
  10815.                          +KALT-CTL-'. CTL is also acceptable.
  10816.   +Eabc d e              run program 'abc' with parameters 'd' and  'e'.  all
  10817.                          parameters after the '+e' are passed to the program.
  10818.  
  10819.   text                   same as +T unless collecting +E parameters, where it
  10820.                          is a parameter
  10821.  
  10822.  
  10823. ViUp, Down move highlight bar
  10824.   Enter    view selected item
  10825.   Escape   exit help viewer
  10826.  
  10827.  
  10828. AuUp, Down pyrscroll screen
  10829.   PgUp, PgDn  scroll screen
  10830.   Left, Right scroll screen
  10831.   Escape      return to top menu
  10832.  
  10833.  
  10834. SeUp, Down          scroll screen
  10835.   PgUp, PgDn        scroll screen
  10836.   Left, Right       scroll screen
  10837.   Escape            return to top menu
  10838.   Space or CtrlPgDn view next section
  10839.   CtrlPgUp          view previous section
  10840.   "+", Enter        jump to first/next hypertext link
  10841.   "-"               jump to previous link/original section
  10842.   "B"               jump back to original section (from before link  jumping)
  10843.  
  10844.   Tab               select next visible link, wraps from last to first
  10845.   ShiftTab          select previous visible hypertext link
  10846.   AltTab            select code fragment for pasting.
  10847.   "P"               paste highlighted code fragment via keyboard buffer.
  10848.  
  10849.  
  10850. General
  10851.  
  10852. The help reader wraps most text. Excluded are specified portions, lists,  and
  10853. a few others. Use the left and right arrow keys to scroll these if need be.
  10854.  
  10855. The help reader is intended to be a 'shell' around an  editor  program.  Some
  10856. people may prefer the term 'shim'.
  10857.  
  10858. Using EMS for most memory requirements, it loads itself and  then  runs  your
  10859. editor for you, providing pop-up help facilities. It will  also  be  able  to
  10860. paste code fragments into your source. If your editor was, for example, 'ME',
  10861. you would place a batch  file  called  'ME.BAT'  in  your  scene  development
  10862. directory. If you use 'VI', you'd create 'VI.BAT', and so on.
  10863.  
  10864. (YOUR-EDITOR-NAME.BAT)
  10865.  
  10866. desired key sequence ───┐
  10867.                         │
  10868.         ┌─────────┐ ┌───┴────────┐ ┌──────────────┐
  10869. povhelp │+W50 +H15│ │+KCTRL-ALT-H│ │+Ed:\me\me.exe│ %1 %2 %3 %4 %5
  10870.         └───────┬─┘ └────────────┘ └───┬──────────┘
  10871.                 │                      │
  10872. size of window ─┘                      │
  10873.                                        │
  10874. place path to your editor here ────────┘
  10875.  
  10876.  
  10877. For example -
  10878.  
  10879. povhelp +W50 +H15 +KALT-H +Ed:\me\me.exe %1 %2 %3 %4 %5
  10880.  
  10881.  
  10882. This
  10883. command line will yield a version of POV-Help with a 50x15 window,  popped-up
  10884. with the ALT-H key sequence, over the editor  'd:\me\me.exe'.  If  you  don't
  10885. specify a key sequence, POV-Help defaults to using ALT-ESC.
  10886.  
  10887. This would load the help reader. which would then  load  ME.EXE,  and  things
  10888. would proceed  as  normal.  When  you  exit  your  editor,  the  help  reader
  10889. automatically unloads. You can  use  the  ALT-ESC  key  sequence  to  pop  up
  10890. POVHELP. This is the default ; there is a way to set it. Note that  no  other
  10891. parameters may appear after the +E parameter as they will just be  passed  to
  10892. the program being run.
  10893.  
  10894. If you use the hotkey to pop-up, POVHELP  performs  a  simplistic  search  of
  10895. sections and titles based on the word under the cursor.  If  found,  you  are
  10896. taken to that. Otherwise,  you  are  taken  to  the  main  menu,  unless  you
  10897. hot-keyed out.
  10898.  
  10899. You can hot-key out of the actual section text, by using  the  same  hot  key
  10900. that got you in. If you press escape, you are taken back up to the top  menu.
  10901. But if you hotkey out, you go back to your program. Next time you  press  the
  10902. hot key, you will be taken back to the same place. No search is performed  in
  10903. this case.
  10904.  
  10905. POVHELP needs EMS if it is running as a shell program.
  10906.  
  10907. If you don't specify the +E parameter, POVHELP will come up as a  stand-alone
  10908. program, in which case it does not use EMS.
  10909.  
  10910. If you highlight a section of code using Alt-Tab, and you are using  POV-Help
  10911. in pop-up mode, then you may paste the code via  the  keyboard  buffer  using
  10912. 'P'.
  10913.  
  10914. As many editors today use auto-indentation, this may cause some problems with
  10915. column alignment. For that reason, POV-Help by default  inserts  a  HOME  key
  10916. code into the keyboard buffer after each CR. Some editors require  more  than
  10917. one HOME key operation to get to the left column. For this reason, the number
  10918. of HOME's sent  may  be  adjusted  from  0  (none)  to  9  using  the  +PH[n]
  10919. command-line parameter. 'n' is any value from 0 to 9 and defaults to 1.
  10920.  
  10921. POV-Help was written by  Christopher J. Cason.
  10922. CIS      : 100032,1644.
  10923. Internet : cjcason@yarrow.wt.uwa.edu.au.
  10924.  
  10925. Converters will be available which  translate  POV-Help  databases  to  other
  10926. formats such as Postscript, LaTeX, RTF, Windows Help, HTML, etc.
  10927.  
  10928. The format of the POV-Help database is documented and freely available.
  10929.  
  10930. POV-Help is free. It may not be  sold.  See  POVLEGAL.DOC  for  details.  The
  10931. POV-Help suite of programs is copyright (c) 1994 C.J. Cason and the POV-Team.
  10932.  
  10933.  
  10934. APPENDIX C       Frequently Asked Questions
  10935.  
  10936. Q. When will POV-Ray 3.0 be released?
  10937.  
  10938. A. In beta form... Now!
  10939.  
  10940. Q. When will the source code be released?
  10941.  
  10942. A. When all platforms finish beta testing.
  10943.  
  10944. Q. When will other platforms go beta?
  10945.  
  10946.  
  10947. APPENDIX D       Where to Get More POV-Ray Stuff
  10948.  
  10949.                    Persistence of Vision(tm) Ray Tracer
  10950.  
  10951.                           POV-Ray(tm) Version 3.0
  10952.  
  10953.                       Where to Get It and Other Info
  10954.  
  10955.                           Draft: February 8, 1996
  10956.  
  10957.       The Persistence of Vision(tm) Ray Tracer creates three-dimensional,
  10958. photo-realistic images using a rendering technique called ray tracing. It
  10959. reads in a text file containing information describing the objects and
  10960. lighting in a scene and generates an image of that scene from the view
  10961. point of a camera also described in the text file. Ray tracing is not a
  10962. fast process by any means, but it produces very high quality images with
  10963. realistic reflections, shading, perspective, and other effects.
  10964.  
  10965.       The POV-Ray(tm) package includes detailed instructions on using the
  10966. ray tracer and creating scenes. Many stunning scenes are included with POV-
  10967. Ray so you can start creating images immediately when you get the package.
  10968. These scenes can be modified by the user also so they don't have to start
  10969. from scratch.
  10970.  
  10971.       In addition to the pre-defined scenes are a large library of
  10972. predefined shapes and materials that can be used in your own scenes by just
  10973. typing the name of the shape or material.
  10974.  
  10975.       POV-Ray is easy to use, and also includes many advanced features like
  10976. bezier patches, blobs, height-fields, bump mapping, and material mapping.
  10977.  
  10978.       POV-Ray can be used under MS-Dos, Windows 3,x, NT & '95; Apple
  10979. Macintosh 68k and Power PC; Commodore Amiga; Linux, UNIX, and other
  10980. computers.
  10981.  
  10982.       Here is a list the files that you need to use POV-Ray on your
  10983. computer.
  10984.  
  10985.       The latest versions of these files are available over CompuServe,
  10986. Internet, America Online, and several BBS's. See 'Where to find POV-Ray
  10987. files' section below for more info.
  10988.  
  10989. ----------------------------------------------------------------------------
  10990.  
  10991.    For MS-Dos systems:
  10992.    -------------------
  10993.    The MS-Dos version runs under Ms-Dos, or as a dos application under
  10994.    Windows'95, Windows NT, Windows 3.1 or 3.11.  It also runs
  10995.    under OS/2 and Warp.
  10996.  
  10997.    Required hardware & software:
  10998.       - A 386 or better CPU and at least 4 meg of RAM.
  10999.       - About 6 meg disk space to install and 2-10 meg or more beyond
  11000.         that for working space.
  11001.       - A text editor capable of editing plain ASCII text files.
  11002.         The EDIT program that comes with MS-Dos will work for moderate
  11003.         size files.
  11004.       - Graphic file viewer capable of viewing GIF and perhaps TGA
  11005.         and PNG formats.
  11006.  
  11007.    Required POV-Ray files:
  11008.       - POVMSDOS.EXE -- a self-extracting archive containing
  11009.         the program, sample scenes, standard include files, and
  11010.         documentation in a hypertext help format with help viewer.
  11011.  
  11012.    Recommended:
  11013.       - Pentium or 486dx or math co-processor for 386 or 486sx
  11014.       - 8 meg or more RAM.
  11015.       - SVGA display preferably with VESA interface and high color
  11016.         or true color ability.
  11017.  
  11018.    Optional:
  11019.       The source code is not needed to use POV-Ray. It is provided
  11020.       for the curious and adventurous.
  11021.       - POVMSD_S.ZIP - The C source code for POV-Ray for MS-Dos.
  11022.         Contains generic parts and MS-Dos specific parts.  Includes
  11023.         sample scenes, standard include files, and documentation in
  11024.         a hypertext help format with help viewer.
  11025.       - A C compiler that can create 32-bit protected mode applications.
  11026.         We support Watcom 10.5a, Borland 4.52 with Dos Power Pack and
  11027.         limited graphics under DJGPP 1.12maint4. DJGPP 2.0 not supported.
  11028.  
  11029.  
  11030.    For Windows systems:
  11031.    --------------------
  11032.    The Windows version runs under Windows'95, Windows NT, and under
  11033.    Windows 3.1 or 3.11 if Win32s extensions are added.
  11034.  
  11035.    Required hardware & software:
  11036.       - A 386 or better CPU and at least 8 meg of RAM.
  11037.       - About 6 meg disk space to install and 2-10 meg or more beyond
  11038.         that for working space.
  11039.       - A text editor capable of editing plain ASCII text files.
  11040.         The Windows notepad program that comes with Windows will work
  11041.         for moderate size files.
  11042.  
  11043.    Required POV-Ray files:
  11044.       - User archive POVWIN32.EXE -- a self-extracting archive containing
  11045.           the program, sample scenes, standard include file, and
  11046.           documentation.
  11047.  
  11048.    Recommended:
  11049.       - Pentium or 486dx or math co-processor for 386 or 486sx
  11050.       - 16 meg or more RAM.
  11051.       - SVGA display preferably with high color or true color ability
  11052.         and drivers installed.
  11053.  
  11054.    Optional:
  11055.       The source code is not needed to use POV-Ray. It is provided
  11056.       for the curious and adventurous.
  11057.       - POVWIN_S.ZIP - The C source code for POV-Ray for Windows.
  11058.         Contains generic parts and Windows specific parts,
  11059.         includes sample scenes, standard include files, and
  11060.         documentation.
  11061.       - POV-Ray can only be compiled using C compilers that create
  11062.         32-bit Windows applications. We support Watcom 10.5a,
  11063.         Borland 4.52 compilers.
  11064.  
  11065.  
  11066.    For Macintosh systems:
  11067.    ----------------------
  11068.    The Macintosh versions run under Apple's MacOS operating system
  11069.    version 7.0 or better, on 68K-based Macintosh or Power Macintosh
  11070.    computers.
  11071.  
  11072.    Required hardware & software:
  11073.       - A 68020 (Mac II) or better CPU with floating point unit or
  11074.  
  11075.         software fpu emulator (e.g. SoftwareFPU) and at least
  11076.         8 MB RAM
  11077.     *or*
  11078.       - Any Power Macintosh computer and at least 8 MB RAM
  11079.       - System 7 or newer and color QuickDraw, System 6 is no longer
  11080.         supported.
  11081.       - About 6 MB free disk space to install and an additional
  11082.         2-10 MB free space for working space.
  11083.       - Graphic file viewer capable of viewing Mac PICT, GIF,
  11084.         and perhaps TGA and PNG formats (shareware GIFConverter
  11085.         or GraphicConverter are good.)
  11086.  
  11087.    Required POV-Ray files:
  11088.       - POVMAC68.SIT -- a Stuffit archive containing the 68K Macintosh
  11089.         program, sample scenes, standard include files, and documentation.
  11090.      *or*
  11091.       - POVPMAC.SIT -- a Stuffit archive containing the native Power
  11092.         Macintosh program, sample scenes, standard include files, and
  11093.         documentation.
  11094.  
  11095.    Recommended:
  11096.       - 68030/33 or faster, or any Power Macintosh
  11097.       - 68K Macintosh: 8 MB or more RAM;
  11098.         Power Macintosh systems: 16 MB or more.
  11099.       - Color monitor preferred, 256 colors OK, but thousands
  11100.         or millions of colors even better.
  11101.  
  11102.    Optional:
  11103.       The source code is not needed to use POV-Ray. It is provided
  11104.       for the curious and adventurous.  POV-Ray can be compiled
  11105.       using Apple's MPW 3.3, Metrowerks CodeWarrior 8, or Symantec 8.
  11106.  
  11107.       POVMACS.ZIP - The C source code for POV-Ray for Macintosh.
  11108.       Contains generic parts and Macintosh specific parts.  Includes
  11109.       sample scenes, standard include files, and documentation.
  11110.  
  11111.  
  11112.    For Amiga systems:
  11113.    ------------------
  11114.       The Amiga version comes in several flavors, 68000/68020 without
  11115.       FPU, (not recommended, very slow) 68020/68881(68882), 68030/68882
  11116.       and 68040. There are also two sub-versions, one with a CLI-only
  11117.       interface, and one with a GUI (requires MUI 3.1).  All versions
  11118.       run under OS2.1 and up. Support exists for pensharing and window
  11119.       display under OS3.x with 256 color palettes, and CybeGFX display
  11120.       library support.
  11121.  
  11122.       Required:
  11123.       - at least 4 meg of RAM.
  11124.       - at least 2 meg of hard disk space for the necessities, 5-20 more
  11125.         recommended for workspace.
  11126.       - an ASCII text editor, GUI configurable to launch the editor of
  11127.         your choice.
  11128.       - Graphic file viewer - POV-Ray outputs to PNG, Targa (TGA), and
  11129.         PPM formats, converters from the PPMBIN distribution are
  11130.         included to convert these to IFF ILBM files.
  11131.  
  11132.       Recommended:
  11133.        - 8 meg or more of RAM.
  11134.        - 68030 & 68882 or higher processor.
  11135.        - 24bit display card (CyberGFX library supported)
  11136.  
  11137.       As soon as a stable compiler is released for Amiga PowerPC
  11138.       systems, plans are to add this to the flavor list.
  11139.  
  11140.  
  11141.    For Linux on Intel 80x86 CPU:
  11142.    -----------------------------
  11143.    Required hardware & software:
  11144.       - A 386 or better CPU and at least 4 meg of RAM.
  11145.       - About 6 meg disk space to install and 2-10 meg or more beyond
  11146.         that for working space.
  11147.       - A text editor capable of editing plain ASCII text files.
  11148.       - Any recent (1994 onwards) Linux kernel and support for the
  11149.         lib.so-style loading. POV-Ray for Linux is not in ELF-format.
  11150.  
  11151.    Required POV-Ray files:
  11152.       - POVLINUX.ZIP or POVLINUX.TAR.GZ -- archive containing
  11153.         an official binary for each of tty-only, SVGALib, and X-Windows
  11154.         modes.  Also contains sample scenes, standard include files, and
  11155.         documentation.
  11156.  
  11157.    Recommended:
  11158.       - Pentium or 486dx or math co-processor for 386 or 486sx
  11159.       - 8 meg or more RAM.
  11160.       - SVGA display preferably high color or true color ability.
  11161.       - If you want display, you'll need either SVGALib or X-Windows.
  11162.       - Graphic file viewer capable of viewing PPM, GIF, TGA or
  11163.         PNG formats.
  11164.  
  11165.    Optional:
  11166.       The source code is not needed to use POV-Ray. It is provided
  11167.       for the curious and adventurous.
  11168.       - POVLIN_S.ZIP - The C source code for POV-Ray for Linux.
  11169.         Contains generic parts and Linux specific parts.  Includes sample
  11170.         scenes, standard include files, and documentation.
  11171.       - The GNU C compiler and (optionally) the X include files and
  11172.         libraries and KNOWLEDGE OF HOW TO USE IT.  Although we provide
  11173.         source code for generic Unix systems, we do not provide technical
  11174.         support on how to compile the program.
  11175.  
  11176.  
  11177.    For generic UNIX:
  11178.    -----------------
  11179.    Required:
  11180.       - POVUNIX.ZIP or POVUNIX.TAR.GZ either one alone is sufficient.
  11181.         These archives contain full generic source, Unix and X-Windows
  11182.         specific source, sample scenes, standard include files, and
  11183.         documentation.
  11184.       - A C compiler for your computer and KNOWLEDGE OF HOW TO USE IT.
  11185.         Although we provide source code for generic Unix systems, we
  11186.         do not provide technical support on how to compile the program.
  11187.       - A text editor capable of editing plain ASCII text files.
  11188.  
  11189.    Recommended:
  11190.       - Pentium or 486dx or math co-processor for 386 or 486sx
  11191.       - 8 meg or more RAM.
  11192.       - SVGA display preferably high color or true color ability.
  11193.       - Graphic file viewer capable of viewing PPM, GIF, TGA or
  11194.         PNG formats.
  11195.  
  11196.    Optional:
  11197.       - X Windows if you want to be able to display as you render.
  11198.       - You will need the X-Windows include files as well. If you're not
  11199.         familiar with compiling programs for X-Windows you may need some
  11200.         help from someone who is knowledgeable at your installation because
  11201.         the X include files and libraries are not always in a standard
  11202.  
  11203.         place.
  11204.  
  11205.  
  11206. ----------------------------------------------------------------------------
  11207.  
  11208.       Each archive includes full documentation for POV-Ray itself as well as
  11209. specific instructions for using POV-Ray with your type of computer.
  11210.  
  11211.  ** POV-Ray(tm) is copyrighted freeware written by the POV-Team(tm).
  11212.  ** It may be freely distributed subject to the restrictions
  11213.  ** defined in POVLEGAL.DOC found all of our archives.
  11214.  ** POV-Ray is NOT public domain software.
  11215.  
  11216.  POV-Ray is based on DKBTrace 2.12 by David K. Buck and Aaron A. Collins.
  11217.  
  11218.       The POV-Team is a collection of volunteer programmers, designers,
  11219. animators and artists meeting via electronic mail on Compuserve's GRAPHDEV
  11220. forum.  GO GRAPHDEV.
  11221.  
  11222.       The POV-Team's goal is to create freely distributable, high
  11223. quality rendering and animation software written in C that can be easily
  11224. ported to many different computers.
  11225.  
  11226.       If you have any questions about POV-Ray, please contact
  11227.  
  11228.       Chris Young
  11229.       [POV-Team Coordinator]
  11230.  
  11231.       CIS: 76702,1655
  11232.       Internet: 76702.1655@compuserve.com
  11233.  
  11234.  
  11235. ---------------------------------------------------------------------------
  11236. Where to find the POV-Ray files
  11237. ---------------------------------------------------------------------------
  11238.  
  11239. Graphics Developer Forum on CompuServe
  11240. --------------------------------------
  11241. POV-Ray headquarters are on CompuServe GRAPHDEV forum ray tracing sections.
  11242. We meet there to share info and graphics and discuss ray tracing, fractals
  11243. and other kinds of computer art.  Everyone is welcome to join in on the
  11244. action on CIS GRAPHDEV. Hope to see you there! You can get information
  11245. on joining CompuServe by calling (800)848-8990 or visit the CompuServe home
  11246. page http://www.compuserve.com. Direct CompuServe access is also available
  11247. in Japan, Europe and many other countries.
  11248.  
  11249.  
  11250. Internet
  11251. --------
  11252. The internet home of POV-Ray is http://www.povray.org and ftp.povray.org.
  11253. Please stop by often for the latest files, utilities, news and images from
  11254. the official POV-Ray internet site.
  11255.  
  11256. The comp.graphics.rendering.raytracing newsgroup has many competent POV-Ray
  11257. users that are very willing to share their knowledge.  They generally ask
  11258. that you first browse a few files to see if someone has already answered the
  11259. same question, and of course, that you follow proper "netiquette".  If you
  11260. have any doubts about the qualifications of the folks that frequent the
  11261. group, a few minutes spend at the Ray Tracing Competition pages at
  11262. www.povray.org will quickly convince you!
  11263.  
  11264.  
  11265. PC Graphics area on America On-Line
  11266. -----------------------------------
  11267. There's an area now on America On-Line dedicated to POV-Ray support and
  11268. information. You can find it in the PC Graphics section of AOL. Jump
  11269. keyword "PCGRAPHICS". This area includes the Apple Macintosh executables
  11270. also.  It is best if messages are left in the "Company Support" section.
  11271. Currently, Bill Pulver (BPulver) is our representative there.
  11272.  
  11273.  
  11274. The Graphics Alternative (TGA) BBS in El Cerrito, CA.
  11275. -----------------------------------------------------
  11276. For those on the West coast, you may want to find the POV-Ray files on The
  11277. Graphics Alternative BBS. It's a great graphics BBS run by Adam Shiffman.
  11278. TGA is high quality, active and progressive BBS system which offers both
  11279. quality messaging and files to its 1300+ users.
  11280.  
  11281.     510-524-2780 (PM14400FXSA v.32bis 14.4k, Public)
  11282.     510-524-2165 (USR DS v.32bis/HST 14.4k, Subscribers)
  11283.  
  11284.  
  11285. PCGNet
  11286. ------
  11287. TGA BBS serves as the central hub for a large network of graphics-oriented
  11288. BBS systems around the world.  Following is a concise listing of active
  11289. PCGNet nodes at the time of this writing.  The POV-Team can not vouch for
  11290. the currency of this information, nor verify that any of these boards may
  11291. carry POV-Ray.
  11292.  
  11293.   USA and Canada
  11294.     SAUG BBS                     Bellevue          WA      206-644-7115
  11295.     The Happy Canyon             Denver            CO      303-759-3598
  11296.     CHAOS BBS                    Columbia          MO      314-874-2930
  11297.     411-Exchange                 Alpharetta        GA      404-345-0008
  11298.     Autodesk Global Village      San Rafael        CA      415-507-5921
  11299.     Space Command BBS            Kennewick         WA      509-735-4894
  11300.     The Graphics Alternative     El Cerrito        CA      510-524-2780
  11301.     The CAD/fx BBS               Mesa              AZ      602-835-0274
  11302.     PC-AUG                       Phoenix           AZ      602-952-0638
  11303.     Time-Out BBS                 Sadsburyville     PA      610-857-2648
  11304.     John's Graphics              Brooklyn Park     MN      612-425-4436
  11305.     CEAO BBS                     Columbus          OH      614-481-3194
  11306.     Canis Major                  Nashville         TN      615-385-4268
  11307.     CAD/Engineering Services     Hendersonville    TN      615-822-2539
  11308.     The Virtual Dimension        Oceanside         CA      619-722-0746
  11309.     Joes CODE BBS                West Bloomfield   MI      810-855-0894
  11310.     The Drawing Board BBS        Anchorage         AK      907-349-5412
  11311.     The New Graphics BBS         Piscataway        NJ      908-271-8878
  11312.     The University               Shrewsbury Twp    NJ      908-544-8193
  11313.  
  11314.   Australia
  11315.     The Baud Room                Melbourne VIC            61-3-481-8720
  11316.     Sydney PCUG Compaq BBS       Caringbah NSW            61-2-540-1842
  11317.     My Computer Company          Erskineville NSW         61-2-557-1489
  11318.     MULTI-CAD Magazine BBS       Toowong QLD              61-7-878-2940
  11319.  
  11320.   Austria
  11321.     Austrian AutoCAD User Group  Graz                    43-316-574-426
  11322.  
  11323.   Belgium
  11324.     Lucas Visions BBS            Boom                     32-3-8447-229
  11325.  
  11326.   Denmark
  11327.     Horreby SuperBBS             Nykoebing Falster        45-53-84-7074
  11328.  
  11329.   Finland
  11330.  
  11331.     DH-Online                    Jari Hiltunen           358-0-40562248
  11332.     Triplex BBS                  Helsinki                358-0-5062277
  11333.  
  11334.   France
  11335.     CAD Connection               Montesson                33-1-39529854
  11336.     Zyllius BBS!                 Saint Paul                 33-93320505
  11337.  
  11338.   Germany
  11339.     Tower of Magic               Gelsenkirchen            49-209-780670
  11340.     Ray BBS Munich               Munich                    49-89-984723
  11341.  
  11342.   Netherlands
  11343.     BBS Bennekom: Fractal Board  Bennekom                 31-8389-15331
  11344.     CAD-BBS                      Nieuwegein               31-3402-90287
  11345.     Foundation One               Baarn                    31-2154-22143
  11346.  
  11347.   New Zealand
  11348.     The Graphics Connection      Wellington               64-4-566-8450
  11349.     The Graphics Connection II   New Plymouth             64-6-757-8092
  11350.     The Graphics Connection III  Auckland                 64-9-309-2237
  11351.  
  11352.   Slovenia
  11353.     MicroArt                     Koper                     386-66-34986
  11354.  
  11355.   Sweden
  11356.     Autodesk On-line             Gothenburg                46-31-401718
  11357.  
  11358.   United Kingdom
  11359.     Raytech BBS                  Tain, Scotland         44-1862-83-2020
  11360.     The Missing Link             Surrey, England        44-181-641-8593
  11361.     CADenza BBS                  Leicester, UK          44-116-259-6725
  11362.  
  11363.   Country or long distance dial numbers may require additional numbers
  11364.   to be used. Consult your local phone company.
  11365.  
  11366.  
  11367. POV-Ray Related Books & CD-ROMs
  11368. -------------------------------
  11369. These items were produced by POV-Team members.  Although they are only
  11370. current to POV-Ray 2.2 they will still be helpful.
  11371.  
  11372.  Ray Tracing Creations, 2d Ed.
  11373.  Chris Young and Drew Wells
  11374.  ISBN 1-878739-69-7
  11375.  Waite Group Press 1994
  11376.    700 pages with color insert and POV-Ray 2.2 on 3.5" MS-Dos disk.
  11377.  
  11378.  Ray Tracing Worlds with POV-Ray
  11379.  Alexander Enzmann, Lutz Kretzschmar, Chris Young,
  11380.  ISBN 1-878739-64-6
  11381.  Waite Group Press 1994
  11382.    Includes Moray 1.5x modeler and POV-Ray 2.2 on 3.5" MS-Dos disks.
  11383.  
  11384.  Ray Tracing for the Macintosh CD
  11385.  Eduard Schwan
  11386.  ISBN 1-878739-72-7
  11387.  Waite Group Press, 1994
  11388.    Comes with a CD-ROM full of scenes, images, and QuickTime movies,
  11389.    and an interactive keyword reference. Also a floppy with POV-Ray for
  11390.    those who don't have a CD ROM drive.
  11391.  
  11392.  Visit http://www.dnai.com:80/waite/ for more details.
  11393.  
  11394.  
  11395.  'The Official POV-Ray CDROM'
  11396.  
  11397.  The Official POV-Ray CDROM is a compilation of images, scene source,
  11398.  program source, utilities and tips on POV-Ray and 3D graphics from the
  11399.  Internet and Compuserve. This CD is aimed fairly and squarely at those
  11400.  who want to create their own images or do general 3D programming work.
  11401.  It's a good resource for those learning POV-Ray as well as those who are
  11402.  already proficient, and contains a Microsoft Windows-based interactive
  11403.  tutorial. The disk is compatible with ISO-9660 and Macintosh formats.
  11404.  
  11405.  For more details, if you have world wide web access you may visit -
  11406.    http://www.povray.org/povcd
  11407.  
  11408.  The CDROM is available for free retrieval and browsing on the World
  11409.  Wide Web -
  11410.    http://www.povray.org/pov-cdrom
  11411.  
  11412.  
  11413. APPENDIX E       Copyright
  11414.  
  11415.                    Persistence of Vision(tm) Ray Tracer
  11416.  
  11417.                           POV-Ray(tm) Version 3.0
  11418.  
  11419.                        Legal Information and License
  11420.  
  11421.                           Draft: February 4, 1996
  11422.  
  11423.                          GENERAL LICENSE AGREEMENT
  11424.  
  11425. THIS NOTICE MUST ACCOMPANY ALL OFFICIAL OR CUSTOM PERSISTENCE OF VISION
  11426. FILES. IT MAY NOT BE REMOVED OR MODIFIED. THIS INFORMATION PERTAINS TO ALL
  11427. USE OF THE PACKAGE WORLDWIDE.  THIS DOCUMENT SUPERSEDES ALL PREVIOUS
  11428. GENERAL LICENSES OR DISTRIBUTION POLICIES. ANY INDIVIDUALS, COMPANIES OR
  11429. GROUPS WHO HAVE BEEN GRANTED SPECIAL LICENSES MAY CONTINUE TO DISTRIBUTE
  11430. VERSION 2.x BUT MUST RE-APPLY FOR VERSION 3.0 OR LATER.
  11431.  
  11432. This document pertains to the use and distribution of the Persistence of
  11433. Vision(tm) Ray Tracer a.k.a POV-Ray(tm). It applies to all POV-Ray program
  11434. source files, executable (binary) files, scene files, documentation files,
  11435. help file, bitmaps and INI files contained in official POV archives.  All
  11436. of these are referred to here as "the software".
  11437.  
  11438. All of this software is Copyright 1991,1996 by the POV-Ray Development
  11439. Team.  Although it is distributed as freeware, it is NOT PUBLIC DOMAIN.
  11440.  
  11441. The copyrighted package may ONLY be distributed and/or modified according
  11442. to the license granted herein.  The spirit of the license is to promote
  11443. POV-Ray as a standard ray tracer, provide the full POV-Ray package freely
  11444. to as many users as possible, prevent POV-Ray users and developers from
  11445. being taken advantage of, enhance the life quality of those who come in
  11446. contact with POV-Ray.  This license was created so these goals could be
  11447. realized.  You are legally bound to follow these rules, but we hope you
  11448. will follow them as a matter of ethics, rather than fear of litigation.
  11449.  
  11450.  
  11451.                              USAGE PROVISIONS
  11452.  
  11453. Permission is granted to the user to use the software and associated files
  11454. in this package to create and render images. The use of this software for
  11455. the purpose of creating images is completely free. The creator of a scene
  11456. file and the image created from the scene file, retains all rights to the
  11457. image and scene file they created and may use them for any purpose
  11458. commercial or noncommercial.
  11459.  
  11460. The user is also granted the right to use the scenes files, fonts, bitmaps,
  11461. and include files distributed in the INCLUDE, TEXSAMPS and NEWDEMO sub-
  11462. directories in their own scenes.  Such permission does not extend to files
  11463. in the POVSCN sub-directory.  POVSCN files are for your enjoyment and
  11464. education but may not be the basis of any derivative works.
  11465.  
  11466.  
  11467.                     GENERAL RULES FOR ALL DISTRIBUTION
  11468.  
  11469. The permission to distribute this package under certain very specific
  11470. conditions is granted in advance, provided that the following conditions
  11471. are met.
  11472.  
  11473. These archives must not be re-archived using a different method without the
  11474. explicit permission of the POV-Team.  You may rename the archives only to
  11475. meet the file name conventions of your system or to avoid file name
  11476. duplications but we ask that you try to keep file names as similar to the
  11477. originals as possible.  (For example:POVSRC.ZIP to POVSRC30.ZIP)
  11478.  
  11479. Ready-to-run unarchived distribution on CD-ROM is also permitted if the
  11480. files are arranged in our standard directory or folder structure as though
  11481. it had been properly installed on a hard disk.
  11482.  
  11483. You must distribute a FULL PACKAGE of files as described in the next
  11484. section.  No portion of this package may be separated from the package and
  11485. distributed separately other than under the conditions specified in the
  11486. provisions given below.
  11487.  
  11488. Non-commercial distribution in which no money or compensation is charged
  11489. (such as a user copying the software for a personal friend or colleague) is
  11490. permitted with no other restrictions.
  11491.  
  11492. Teachers and educational institutions may also distribute the material to
  11493. students and may charge minimal copying costs if the software is to be used
  11494. in a course.
  11495.  
  11496.  
  11497.                        DEFINITION OF "FULL PACKAGE"
  11498.  
  11499. POV-Ray is contained in two sets of archives for each hardware platform.
  11500.       1) End user executable archives containing an executable program,
  11501.          documentation, and sample scenes but no source.
  11502.       2) Programmer archives containing full source code, documentation,
  11503.          and sample scenes but no executable.
  11504.  
  11505. POV-Ray is officially distributed for MS-Dos; Windows 32-bit; Linux for
  11506. Intel '086 series; Apple Macintosh; Apple PowerPC; and Commodore Amiga.
  11507. Other systems may be added in the future.
  11508.  
  11509. Distributors need not support all platforms but for each platform you
  11510. support you must distribute a full package.  For example an Macintosh only
  11511. BBS need not distribute the Windows versions.
  11512.  
  11513. This software may ONLY be bundled with other software packages according to
  11514. the conditions specified in the provisions below.
  11515.  
  11516.  
  11517.          CONDITIONS FOR SHAREWARE/FREEWARE DISTRIBUTION COMPANIES
  11518.  
  11519. Shareware and freeware distribution companies may distribute the software
  11520. included in software-only compilations using media such as, but not limited
  11521. to, floppy disk, CD-ROM, tape backup, optical disks, hard disks, or memory
  11522. cards.  This section only applies to distributors of collected programs.
  11523. Anyone wishing to bundle the package with a shareware product must use the
  11524. commercial bundling rules.  Any bundling with books, magazines or other
  11525. print media should also use the commercial rules.
  11526.  
  11527. You must notify us that you are distributing POV-Ray and must provide us
  11528. with information on how to contact you should any support issues arise.
  11529.  
  11530. No more than five dollars U.S. ($5) can be charged per disk for the copying
  11531. of this software and the media it is provided on. Space on each disk must
  11532. used as fully as possible.  You may not spread the files over more disks
  11533. than are necessary.
  11534.  
  11535. Distribution on high volume media such as backup tape or CD-ROM is
  11536. permitted if the total cost to the user is no more than $0.08 U.S. dollars
  11537. per megabyte of data.  For example a CD-ROM with 600 meg could cost no more
  11538. than $48.00.
  11539.  
  11540.  
  11541.  
  11542.        CONDITIONS FOR ON-LINE SERVICES AND BBS'S INCLUDING INTERNET
  11543.  
  11544. On-line services, BBS's and internet sites may distribute the POV-Ray
  11545. software under the conditions in this section.  Sites which allow users to
  11546. run POV-Ray from remote locations must use separate provisions in the
  11547. section below.
  11548.  
  11549. The archives must be all be easily available on the service and should be
  11550. grouped together in a similar on-line area.
  11551.  
  11552. It is strongly requested that sites remove prior versions of POV-Ray to
  11553. avoid user confusion and simplify or minimize our support efforts.
  11554.  
  11555. The site may only charge standard usage rates for the downloading of this
  11556. software. A premium may not be charged for this package. I.E. CompuServe or
  11557. America On-Line may make these archives available to their users, but they
  11558. may only charge regular usage rates for the time required to download.
  11559.  
  11560.  
  11561.                    ONLINE OR REMOTE EXECUTION OF POV-Ray
  11562.  
  11563. Some internet sites have been set up so that remote users can actually run
  11564. POV-Ray software on the internet server.  Other companies sell CPU time for
  11565. running POV-Ray software on workstations or high-speed computers.  Such use
  11566. of POV-Ray software is permitted under the following conditions.
  11567.  
  11568. Fees or charges, if any, for such services must be for connect time,
  11569. storage or processor usage ONLY.  No premium charges may be assessed for
  11570. use of POV-Ray beyond that charged for use of other software.  Users must
  11571. be clearly notified that they are being charged for use of the computer and
  11572. not for use of POV-Ray software.
  11573.  
  11574. Users must be prominently informed that they are using POV-Ray software,
  11575. that such software is free, and where they can find official POV-Ray
  11576. software.  Any attempt to obscure the fact that the user is running POV-Ray
  11577. expressly prohibited.
  11578.  
  11579. All files normally available in a full package distribution, especially a
  11580. copy of this license and full documentation must be available for download
  11581. or readable online so that users of an online executable have access to all
  11582. of the material of a full user package.
  11583.  
  11584. If the POV-Ray software has been modified in any way, it must also follow
  11585. the provisions for custom versions below.
  11586.  
  11587.  
  11588.               CONDITIONS FOR DISTRIBUTION OF CUSTOM VERSIONS
  11589.  
  11590. The user is granted the privilege to modify and compile the source code for
  11591. their own personal use in any fashion they see fit.  What you do with the
  11592. software in your own home is your business.
  11593.  
  11594. If the user wishes to distribute a modified version of the software,
  11595. documentation or other parts of the package (here after referred to as a
  11596. "custom version") they must follow the provisions given below.  This
  11597. includes any translation of the documentation into other languages or other
  11598. file formats.  These license provisions have been established to promote
  11599. the growth of POV-Ray and prevent difficulties for users and developers
  11600. alike.  Please follow them carefully for the benefit of all concerned when
  11601. creating a custom version.
  11602.  
  11603. No portion of the POV-Ray source code may incorporated into another program
  11604. unless it is clearly a custom version of POV-Ray that includes all of the
  11605. basic functions of POV-Ray.
  11606.  
  11607. All executables, documentation, modified files and descriptions of the same
  11608. must clearly identify themselves as a modified and unofficial version of
  11609. POV-Ray.  Any attempt to obscure the fact that the user is running POV-Ray
  11610. or to obscure that this is an unofficial version expressly prohibited.
  11611.  
  11612. You must provide all POV-Ray support for all users who use your custom
  11613. version.  You must provide information so that user may contact you for
  11614. support for your custom version.  The POV-Ray Development Team is not
  11615. obligated to provide you or your users any technical support.
  11616.  
  11617. Include contact information in the DISTRIBUTION_MESSAGE macros in the
  11618. source file OPTOUT.H and insure that the program prominently displays this
  11619. information.  Display all copyright notices and credit screens for the
  11620. official version.
  11621.  
  11622. Custom versions may only be distributed as freeware.  You must make all of
  11623. your modifications to POV-Ray freely and publicly available with FULL
  11624. SOURCE CODE to the modified portions of POV-Ray and must freely distribute
  11625. full source to any new parts of the custom version.  The goal is that users
  11626. must be able to re-compile the program themselves and to be able to further
  11627. improve the program with their own modifications.
  11628.  
  11629. You must provide documentation for any and all modifications that you have
  11630. made to the program that you are distributing.  Include clear and obvious
  11631. information on how to obtain the official POV-Ray.
  11632.  
  11633. The user is encouraged to send enhancements and bug fixes to the POV-Ray
  11634. Development Team, but the team is in no way required to utilize these
  11635. enhancements or fixes.  By sending material to the team, the contributor
  11636. asserts that he owns the materials or has the right to distribute these
  11637. materials.  He authorizes the team to use the materials any way they like.
  11638. The contributor still retains rights to the donated material, but by
  11639. donating, grants unrestricted, irrevocable usage and distribution rights to
  11640. the POV-Ray Development Team. The team doesn't have to use the material,
  11641. but if we do, you do not acquire any rights related to POV-Ray.  The team
  11642. will give you credit as the creator of new code if applicable.
  11643.  
  11644. Include a copy of this document.
  11645.  
  11646.  
  11647.                     CONDITIONS FOR COMMERCIAL BUNDLING
  11648.  
  11649. Vendors wishing to bundle POV-Ray with commercial software (including
  11650. shareware) or with publications must first obtain explicit permission from
  11651. the POV-Ray Development Team.  This includes any commercial software or
  11652. publications, such as, but not limited to, magazines, cover-disk
  11653. distribution, books, newspapers, or newsletters in print or machine
  11654. readable form.
  11655.  
  11656. The POV-Ray Development Team will decide if such distribution will be
  11657. allowed on a case-by-case basis and may impose certain restrictions as it
  11658. sees fit. The minimum terms are given below. Other conditions may be
  11659. imposed.
  11660.  
  11661.       Purchasers of your product must not be led to believe that they are
  11662. paying for POV-Ray.  Any mention of the POV-Ray bundle on the box, in
  11663. advertising or in instruction manuals must be clearly marked with a
  11664. disclaimer that POV-Ray is free software and can be obtained for free or
  11665. nominal cost from various sources.
  11666.       Include clear and obvious information on how to obtain the official
  11667. POV-Ray.
  11668.  
  11669.       You must provide all POV-Ray support for all users who acquired POV-
  11670. Ray through your product.  The POV-Ray Development Team is not obligated to
  11671. provide you or your customers any technical support.
  11672.       Include a credit page or pages in your documentation for POV-Ray.
  11673.       If you modify any portion POV-Ray for use with your hardware or
  11674. software, you must follow the custom version rules in addition to these
  11675. rules.
  11676.       Include contact and support information for your product.
  11677.       Include a full user package as described above.
  11678.  
  11679.  
  11680.                              OTHER PROVISIONS
  11681.  
  11682. The team permits and encourages the creation of programs, including
  11683. commercial packages, which import, export or translate files in the POV-Ray
  11684. Scene Description Language.  There are no restrictions on use of the
  11685. language itself.  We reserve the right to add or remove or change any part
  11686. of the language.
  11687.  
  11688. "POV-Ray", "Persistence of Vision", and "POV-Help" are trademarks of the
  11689. POV-Ray Development Team.
  11690.  
  11691. While we do not claim any restrictions on the letters "POV" alone, we
  11692. humbly request that you not use POV in the name of your product.  Such use
  11693. tends to imply it is a product of the POV-Ray Development Team.  Existing
  11694. programs which used "POV" prior to the publication of this document need
  11695. not feel guilty for doing so provided that you make it clear that the
  11696. program is not the work of the team nor endorsed by us.
  11697.  
  11698.  
  11699.                            REVOCATION OF LICENSE
  11700.  
  11701. VIOLATION OF THIS LICENSE IS A VIOLATION OF COPYRIGHT LAWS.  IT WILL RESULT
  11702. IN REVOCATION OF ALL DISTRIBUTION PRIVILEGES AND MAY RESULT IN CIVIL OR
  11703. CRIMINAL PENALTY.
  11704.  
  11705. Such violators who are prohibited from distribution will be identified in
  11706. this document.
  11707.  
  11708. In this regard, "PC Format", a magazine published by Future Publishing,
  11709. Ltd. in the United Kingdom, distributed incomplete versions of POV-Ray 1.0
  11710. in violation the license which was effect at the time.  They later
  11711. attempted to distribute POV-Ray 2.2 without prior permission of the POV-Ray
  11712. Team in violation the license which was in effect at the time.  Therefore
  11713. "PC Format", and any other magazine, book or CD-ROM publication owned by
  11714. Future Publishing is expressly prohibited from any distribution of POV-Ray
  11715. software until further notice.
  11716.  
  11717.  
  11718.                                 DISCLAIMER
  11719.  
  11720. This software is provided as is without any guarantees or warranty.
  11721. Although the authors have attempted to find and correct any bugs in the
  11722. package, they are not responsible for any damage or losses of any kind
  11723. caused by the use or misuse of the package. The authors are under no
  11724. obligation to provide service, corrections, or upgrades to this package.
  11725.  
  11726.                      ---End of License Information---
  11727.  
  11728. We sincerely hope you have fun with our program.  If you have any problems
  11729. with the program, the team would like to hear about them. Also, if you have
  11730. any comments, questions or enhancements, please contact the POV-Ray Team on
  11731. the CompuServe Information Service in the GO GRAPHICS forums, GRAPHDEV
  11732. forum.  Also check us out on the internet at http://www.povray.org or
  11733. ftp.povray.org.
  11734.  
  11735. License enquiries should be made via email and limited technical support is
  11736. available via email to:
  11737.  
  11738.    Chris Young
  11739.    POV-Ray Team Coordinator
  11740.    CIS: 76702,1655
  11741.    Internet 76702.1655@compuserve.com
  11742.  
  11743. The following postal address is only for official license business and only
  11744. if email is impossible.
  11745.  
  11746. We do not provide technical support via regular mail, only email.  We don't
  11747. care if you don't have a modem or online access.  We will not mail you
  11748. disks with updated versions.  Do not send money.
  11749.  
  11750.    Chris Young
  11751.    3119 Cossell Drive
  11752.    Indianapolis, IN 46224 U.S.A.
  11753.  
  11754. The other authors' contact information may be found in the documentation.
  11755.  
  11756.  
  11757. APPENDIX F       Authors
  11758.  
  11759.                                  Steve Anger
  11760.                          (POV-Ray 2.0/3.0 developer)
  11761.                                CIS: 70714,3113
  11762.                          Internet: sanger@hookup.net
  11763.  
  11764.                                 Randy Antler
  11765.                      (IBM-PC display code enhancements)
  11766.  
  11767.                                  John Baily
  11768.                               (RLE targa code)
  11769.  
  11770.                                  Eric Barish
  11771.                               (Ground fog code)
  11772.  
  11773.                                 Dieter Bayer
  11774.                            (POV-Ray 3.0 developer)
  11775.                               CIS: 100255,3074
  11776.  
  11777.                                Kendall Bennet
  11778.                            (PMODE library support)
  11779.  
  11780.                                 Steve Bennett
  11781.                                 (GIF support)
  11782.  
  11783.                               Jeff Bowermaster
  11784.                                  (Beta test)
  11785.  
  11786.                                  David Buck
  11787.                         (Original author of DKBTrace)
  11788.                            (POV-Ray 1.0 developer)
  11789.  
  11790.                                  Chris Cason
  11791.              (POV-Ray 2.0/3.0 developer, POV-Help, Windows port)
  11792.    Internet (preferred): Chris.Cason@oaks.com.au or Chris.Cason@povray.org
  11793.                               CIS: 100032,1644
  11794.  
  11795.                                 Aaron Collins
  11796.                         (Co-author of DKBTrace 2.12)
  11797.                            (POV-Ray 1.0 developer)
  11798.  
  11799.                                 Chris Dailey
  11800.                            (POV-Ray 3.0 developer)
  11801.                                     CIS:
  11802.  
  11803.                                 Steve Demlow
  11804.                            (POV-Ray 3.0 developer)
  11805.                                     CIS:
  11806.  
  11807.                            Joris van Drunen Littel
  11808.                               (Mac beta tester)
  11809.  
  11810.                               Alexander Enzmann
  11811.                        (POV-Ray 1.0/2.0/3.0 developer)
  11812.                                CIS: 70323,2461
  11813.                          Internet: xander@mitre.com
  11814.  
  11815.                                  Dan Farmer
  11816.                        (POV-Ray 1.0/2.0/3.0 developer)
  11817.                                CIS: 74431,1075
  11818.  
  11819.                                  David Harr
  11820.                      (Mac balloon help and palette code)
  11821.  
  11822.                                  Jimmy Hoeks
  11823.                    (Help file for Windows user interface)
  11824.  
  11825.                                 Terry Kanakis
  11826.                                 (Camera fix)
  11827.  
  11828.                             Kari Juharvi Kivisalo
  11829.                               (Ground fog code)
  11830.  
  11831.                                  Adam Knight
  11832.                 (Mac beta tester, Mac Apple Guide developer)
  11833.                                     CIS:
  11834.  
  11835.                               Lutz Kretzschmar
  11836.    (IBM-PC display code [SS24 truecolor], part of the anti-aliasing code)
  11837.                               CIS: 100023,2006
  11838.  
  11839.                               Charles Marslette
  11840.                             (IBM-PC display code)
  11841.  
  11842.                               Pascal Massimino
  11843.                               (Fractal objects)
  11844.  
  11845.                                 Jim McElhiney
  11846.                            (POV-Ray 3.0 developer)
  11847.                                     CIS:
  11848.  
  11849.                                  Mike Miller
  11850.                       (Artist, scene files, stones.inc)
  11851.                                CIS: 70353,100
  11852.  
  11853.                                 Douglas Muir
  11854.                          (Bump maps, height fields)
  11855.  
  11856.                                 Joel NewKirk
  11857.                                (Amiga Version)
  11858.                                     CIS:
  11859.  
  11860.                                 Jim Nitchals
  11861.                          (Mac version, scene files)
  11862.  
  11863.                                  Paul Novak
  11864.                            (Texture contributions)
  11865.  
  11866.                                   Dave Park
  11867.                        (Amiga support, AGA video code)
  11868.  
  11869.                                  David Payne
  11870.                               (RLE targa code)
  11871.  
  11872.                                  Bill Pulver
  11873.                          (Time code, IBM-PC compile)
  11874.  
  11875.                                  Anton Raves
  11876.              (Beta tester, helping out on several Mac thingies)
  11877.                               CIS: 100022,2603
  11878.  
  11879.                                Dan Richardson
  11880.                                    (Docs)
  11881.                                     CIS:
  11882.  
  11883.                                  Tim Rowley
  11884.  
  11885.              (PPM and Windows-specific BMP image format support)
  11886.                        Internet: trowley@geom.umn.edu
  11887.  
  11888.                               Robert Schadewald
  11889.                                 (Beta tester)
  11890.                                     CIS:
  11891.  
  11892.                                 Eduard Schwan
  11893.                      (Mac version, mosaic preview, docs)
  11894.                                CIS: 71513,2161
  11895.  
  11896.                                Robert Skinner
  11897.                               (Noise functions)
  11898.  
  11899.                               Erkki Sondergaard
  11900.                                 (Scene files)
  11901.                                     CIS:
  11902.  
  11903.                                Zsolt Szalavari
  11904.                                  (Halo code)
  11905.                        Internet: zsolt@cg.tuwien.ac.at
  11906.  
  11907.                                 Scott Taylor
  11908.                         (Leopard and onion textures)
  11909.  
  11910.                                Timothy Wegner
  11911.                               (Fractal objects)
  11912.                                     CIS:
  11913.  
  11914.                                  Drew Wells
  11915.             (POV-Ray 1.0 developer, POV-Ray 1.0 team coordinator)
  11916.  
  11917.                                  Chris Young
  11918.       (POV-Ray 1.0/2.0/3.0 developer, POV-Ray 2.0/3.0 team coordinator)
  11919.                                CIS: 76702,1655
  11920.  
  11921.  
  11922.